Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all 4964 articles
Browse latest View live

New Post: CheckComboBox selectedItems

$
0
0
Hi,

As stated in the documentation, "CheckComboBox.SelectedItems : Gets the collection of checked items."
This cannot be set.

As stated in the documentation, "CheckComboBox.SelectedItemsOverride : Gets or sets a custom IList of selected items."
This is a get/set property.
It lets you set the list of selectedItems, but will always be null if you don't set it.
What you want is to work the this property :
<StackPanel>
    <xctk:CheckComboBox x:Name="UserGroupsCheckedComboBox"
                        ItemsSource="{Binding UserGroups}"
                        SelectedItemsOverride="{Binding SelectedUserGroups}"
                        DisplayMemberPath="Name"
                        ValueMemberPath="ID" />

    <StackPanel Margin="0,200,0,0"
                Orientation="Horizontal">
      <TextBlock Text="SelectedItems : " />
      <TextBlock Text="{Binding SelectedItemsOverride.Count, ElementName=UserGroupsCheckedComboBox}" />
    </StackPanel>
   
  </StackPanel>
  public partial class MainWindow : Window
  {
    public MainWindow()
    {
      InitializeComponent();
      this.UserGroups = new ObservableCollection<MyData>()
      {
        new MyData() { ID = 1, Name = "First" },
        new MyData() { ID = 2, Name = "Second" },
        new MyData() { ID = 3, Name = "Third" },
        new MyData() { ID = 4, Name = "Fourth" },
        new MyData() { ID = 5, Name = "Fifth" },
      };
      this.SelectedUserGroups = new ObservableCollection<MyData>() { this.UserGroups[ 2 ] };
      this.DataContext = this;
    }

    public ObservableCollection<MyData> UserGroups
    {
      get;
      set;
    }

    public ObservableCollection<MyData> SelectedUserGroups
    {
      get;
      set;
    }
  }

  public class MyData
  {
    public string Name
    {
      get;
      set;
    }

    public int ID
    {
      get;
      set;
    }
  }
――――
Get more controls, features, updates and technical support with Xceed Toolkit Plus for WPF

New Comment on "CheckComboBox"

$
0
0
Discussion has been created for the last comments : https://wpftoolkit.codeplex.com/discussions/662425#

Created Unassigned: IntegerUpDown (likely others as well) .Focus() not working. [22520]

$
0
0
Calling IntegerUpDown.Focus() doesn't seem to have any effect.

New Post: PropertyGrid error when opening collection

$
0
0
Hi,

I am getting the same crash with v3.0 with the CollectionControlDialog


It happens when I click on the List Property inside the Property grid.


<xctk:PropertyGrid Grid.Column="1"
                        x:Name="propertyGrid"
                        ShowSummary="True"
                        IsCategorized="True"
                        ShowAdvancedOptions="False" 
                        SelectedObject="{Binding ElementName=PadListBox, Path=SelectedItem}"
                        SelectedObjectName="{Binding ElementName=PadListBox, Path=SelectedItem.ToString}"
                        Margin="5"
                        UpdateTextBoxSourceOnEnterKey="True"
                        >
            <xctk:PropertyGrid.EditorDefinitions>              
                <xctk:EditorTemplateDefinition>
                    <xctk:EditorTemplateDefinition.TargetProperties>
                        <sys:String>DrillOutline</sys:String>
                    </xctk:EditorTemplateDefinition.TargetProperties>

                    <xctk:EditorTemplateDefinition.EditingTemplate>
                        <DataTemplate>
                            <Button Content=" ... "    Click="DrillOutlineButton_Click" />
                        </DataTemplate>
                    </xctk:EditorTemplateDefinition.EditingTemplate>
                </xctk:EditorTemplateDefinition>

            </xctk:PropertyGrid.EditorDefinitions>

        </xctk:PropertyGrid>
CollectionControlDialog collectionControlDialog = new CollectionControlDialog();
        collectionControlDialog.ItemsSourceType = typeof(DTShapeCollection); 

        collectionControlDialog.ItemsSource = selectedPad.Drill.DrillOutline;

        collectionControlDialog.NewItemTypes = new List<System.Type>() { typeof(DTCircle), typeof(DTEllipse), typeof(DTRectangle) };

        if (collectionControlDialog.ShowDialog() == true)
thanks
Mary

Commented Unassigned: IntegerUpDown (likely others as well) .Focus() not working. [22520]

$
0
0
Calling IntegerUpDown.Focus() doesn't seem to have any effect.
Comments: ** Comment from web user: BoucherS **

Hi,

This is already fixed.
The fix is included in v3.1.

――――
_Get more controls, features, updates and technical support with [Xceed Toolkit Plus for WPF](https://wpftoolkit.codeplex.com/wikipage?title=Compare%20Editions)_

Edited Issue: IntegerUpDown (likely others as well) .Focus() not working. [22520]

$
0
0
Calling IntegerUpDown.Focus() doesn't seem to have any effect.

New Post: PropertyGrid error when opening collection

$
0
0
Hi,

Can you attach a sample so we can test the same thing as you ?
Thanks.

――――
Get more controls, features, updates and technical support with Xceed Toolkit Plus for WPF

New Post: CollectionControl NewItemTypes display names

$
0
0
How can I give the new item types in the combobox a friendly name?
It does not seem to respect the DisplayName attribute.

e.g. It shows "MyClass", but I want "My Class".

New Comment on "DataGrid"

$
0
0
I'm using this Control with only the "Name" and "ItemsSource" Properties set to, respectively, a constant and a "ObservableCollection<myClass>". The values of the Group Headers (i.e. "France", "Reims", "Lyons", "(5 items)" and "(10 items)") are showing as blank. I can still click on the Group Headers to drop down the combo box to jump to a Group. I tried embedding a copy of the "tableViewGroupHeaderControlTemplate" from "TableflowView.Aero.normalcolor.xaml", but didn't notice a any change.

New Comment on "DataGrid"

$
0
0
Hi, Please use a discussion thread and attach a sample so we can reproduce. Thanks.

Created Unassigned: Resource errors in AvalonDock 3.0.0 [22524]

$
0
0
AvalonDock 3.0.0 can't locate resources. Here is the output in the Visual Studio.

Resource not found; ResourceKey='TargetType=Xceed.Wpf.AvalonDock.Themes.AeroColors ID=BaseColor12';
Resource not found; ResourceKey='TargetType=Xceed.Wpf.AvalonDock.Themes.AeroColors ID=BaseColor3';
Resource not found; ResourceKey='TargetType=Xceed.Wpf.AvalonDock.Themes.AeroColors ID=BaseColor5';
Resource not found; ResourceKey='TargetType=Xceed.Wpf.AvalonDock.Themes.AeroColors ID=BaseColor4';
Resource not found; ResourceKey='TargetType=Xceed.Wpf.AvalonDock.Themes.AeroColors ID=BaseColor2';
Resource not found; ResourceKey='TargetType=Xceed.Wpf.AvalonDock.Themes.AeroColors ID=BaseColor12';

DockingManager is defined to allow changing themes:

<xcad:DockingManager Name="dockSite" Theme="{Binding ElementName=ThemeCombo, Path=SelectedItem.Tag}"></xcad:DockingManager>

<ComboBox x:Name="ThemeCombo" SelectedIndex="0" Width="62"><ComboBoxItem Content="Aero"> <ComboBoxItem.Tag><xcad:AeroTheme /></ComboBoxItem.Tag></ComboBoxItem><ComboBoxItem Content="Navy"><ComboBoxItem.Tag><xcad:VS2010Theme /></ComboBoxItem.Tag></ComboBoxItem>
<ComboBoxItem Content="Metro"><ComboBoxItem.Tag><xcad:MetroTheme /></ComboBoxItem.Tag>
</ComboBoxItem></ComboBox>

Commented Unassigned: DoubleUpDown Dependency Property Already Registered [22247]

$
0
0
I am getting the following Xaml designer error when I use two different types of UpDown controls in the same document (In my case I have several IntegerUpDown controls and a DoubleUpDown). It seems that the dependency property is being registered multiple times, though it appears to be set up correctly as a static property in CommonNumericUpDown<T>. If I get rid of the DoubleUpDown control, the error goes away, but if I leave the DoubleUpDown and get rid of the IntegerUpDown controls instead, I get a similar error, but referencing the 'AutoMoveFocus' property (contained in UpDownBase<T>). This error doesn't prevent me from compiling and running my project just fine, but it does throw the error in the designer and prevent the design display from displaying my controls.

__Error__

Severity Code Description Project File Line Suppression State 'ParsingNumberStyle' property was already registered by 'Xceed_Wpf_Toolkit_CommonNumericUpDown`1_39_157692670'.
Comments: ** Comment from web user: reasra **

Can confirm shui's post:
Problem occurs with 2.9 and 3.0, only when x64 is the target.
On all xaml that uses at least two controls that inherit UpDownBase.

New Comment on "CheckComboBox"

$
0
0
Is there some kind of copy protection on this toolkit?!? I was using CheckComboBox, DataGridControl and DateTimePickerjust fine for a few weeks until I got some weird error while ending debugging. Ever since then, all 3 (and only the Xceed vs. NET) Controls show up as invisible (except for resize box the Designer puts around it when you select it)!?! I tried reopening the Solution / Visual Studio and switching to a backup copy of my entire Project. The backup copy worked - UNTIL I renamed its Solution back to the primary name!?! Apparently, the problem occurs *only* with my normal Solution name!?! If I add/drop/change even a single character on the Solution name, the problem goes away!?! ARRRRRRRRGHHHHH!!!

New Post: CheckComboBox selectedItems

$
0
0
Thanks, BoucherS! I just noticed this Discussion (20 days later)! CodePlex really should have a way of notifying commenters when people reply. Oh well, it's a moot point, since they're shuttering. So, are you an employee of Xceed?
  1. Re. "SelectedItems": Thx, I should've read the docs. The combo of this and the "SelectedItemsOverride" Properties is unusual way of implementing a multi-item Control. Any idea why?
  2. Re. "SelectedItemsOverride": Ok. It's working.
  3. "SelectedItemsOverride"'s Bound Property's is being updated by the View, but its Setter is never called. Do I have to Handle the Backing Variable's "CollectionChanged" Event or Bind to the "Command" Property to be notified when a selected items have changed?
  4. I just noticed that the "Command" that's usually executed whenever an item is toggled doesn't get called the first time I assign "SelectedItemsOverride" to a new "ObservableCollection" I've built.
Let me know if any of this shold be a new Discussion(s).

New Post: CheckComboBox selectedItems

$
0
0
Woah, wait a minute. Re. #1 ("Re. "SelectedItems"): You said "As stated in the documentation, "CheckComboBox.SelectedItems : Gets the collection of checked items."
This cannot be set.". Actually, I did read the docs and did know it was a read-only Property! That's why I made set the Binding "Mode=OneWayToSource" which, according to MSDN, "Updates the source property when the target property changes.". I read that to mean it should work even when the "target property" is "read-only"!

New Post: CheckboxCombobox - Select Alll option

$
0
0
Hi, is there way, where i can select all items in checkbox combobox?

I want to add a checkbox with name: select all and he will select and unselect all items in collection.

Thanks for tips.

New Post: CheckboxCombobox - Select Alll option

$
0
0
Hi,

in Toolkit v3.4, you will have the option of adding(or not) a "select All" option in the CheckComboBox and CheckListBox through a bool property.

――――
Get more controls, features, updates and technical support with Xceed Toolkit Plus for WPF

New Post: CheckComboBox selectedItems

$
0
0
Hi tchien69,
  1. The SelectedItemsOverride property was added something like 3 years ago to prevent a CheckListBox/CheckCombobox binding problem when used in a DataTemplate, could be related to issue https://wpftoolkit.codeplex.com/workitem/18431.
As for the OneWayToSource binding on a readOnly property, you could have a look at this page : https://meleak.wordpress.com/2011/08/28/onewaytosource-binding-for-readonly-dependency-property/.
  1. If you want to know when an item selection has changed, you can use the event CheckComboBox.ItemSelectionChanged. It will be called every time an item is selected or un-selected.
  2. What do you mean by "the "Command" that's usually executed whenever an item is toggled" ?
――――
Get more controls, features, updates and technical support with Xceed Toolkit Plus for WPF

New Post: CheckComboBox selectedItems

$
0
0
  1. Re. need for "SelectedItemsOverride" Property separate from "SelectedItems": Ok. Understood. Thx!
  2. Re. "OneWayToSource" Binding not supported by .NET on Read-Only Dependency Properties: Sigh. Ok. Understood. Thx!
  3. Re. "Command": I'm referring to the "Command" Property that listed in the docs (here: "https://wpftoolkit.codeplex.com/wikipage?title=CheckComboBox&referringTitle=Home") as "Gets or sets the command to execute when an item is checked/unchecked. (Inherited from Selector)". In my code sample above, I've Bound it to an ICommand via the XAML Attribute setting "Command="{Binding OnUserGroupsChangedCommand}"" the ICommand I've since renamed to a more appropriate "OnUserGroupTypeToggledCommand".

New Post: CheckComboBox selectedItems

$
0
0
Hi,

For the command property not being called the first time when "SelectedItemsOverride" is assigned to a new "ObservableCollection", how exactly do you reproduce this ? Here's my sample that looks good :
<StackPanel>
      <xctk:CheckComboBox x:Name="UserGroupsCheckedComboBox"
                          ItemsSource="{Binding UserGroups}"
                          SelectedItemsOverride="{Binding SelectedUserGroups}"
                          DisplayMemberPath="Name"
                          Command="{Binding OnUserGroupTypeToggledCommand}"
                          ValueMemberPath="ID" />

      <StackPanel Margin="0,200,0,0"
                  Orientation="Horizontal">
        <TextBlock Text="SelectedItems : " />
        <TextBlock Text="{Binding SelectedItemsOverride.Count, ElementName=UserGroupsCheckedComboBox}" />
      </StackPanel>
</StackPanel>
  public partial class MainWindow : Window
  {
    public MainWindow()
    {
      InitializeComponent();

      this.UserGroups = new ObservableCollection<MyData>()
      {
        new MyData() { ID = 1, Name = "First" },
        new MyData() { ID = 2, Name = "Second" },
        new MyData() { ID = 3, Name = "Third" },
        new MyData() { ID = 4, Name = "Fourth" },
        new MyData() { ID = 5, Name = "Fifth" },
      };
      this.SelectedUserGroups = new ObservableCollection<MyData>() { this.UserGroups[ 2 ] };
      this.DataContext = this;

      this.OnUserGroupTypeToggledCommand = new RelayCommand( param => SaveExecute(), param => CanExecuteMyCommand() );
    }

    public ICommand OnUserGroupTypeToggledCommand
    {
      get;
      set;
    }

    public ObservableCollection<MyData> UserGroups
    {
      get;
      set;
    }

    public ObservableCollection<MyData> SelectedUserGroups
    {
      get;
      set;
    }

    private bool CanExecuteMyCommand()
    {
      return true;
    }

    public void SaveExecute()
    {
      System.Diagnostics.Debug.WriteLine("Saving !!");
    }
  }

  public class MyData
  {
    public string Name
    {
      get;
      set;
    }

    public int ID
    {
      get;
      set;
    }
  }


  public class RelayCommand : ICommand
  {
    #region Fields 
    readonly Action<object> _execute;
    readonly Predicate<object> _canExecute;
    #endregion // Fields 
    #region Constructors 
    public RelayCommand( Action<object> execute ) : this( execute, null ) { }
    public RelayCommand( Action<object> execute, Predicate<object> canExecute )
    {
      if( execute == null )
        throw new ArgumentNullException( "execute" );
      _execute = execute;
      _canExecute = canExecute;
    }
    #endregion // Constructors 
    #region ICommand Members 
    [DebuggerStepThrough]
    public bool CanExecute( object parameter )
    {
      return _canExecute == null ? true : _canExecute( parameter );
    }
    public event EventHandler CanExecuteChanged
    {
      add
      {
        CommandManager.RequerySuggested += value;
      }
      remove
      {
        CommandManager.RequerySuggested -= value;
      }
    }
    public void Execute( object parameter )
    {
      _execute( parameter );
    }
    #endregion // ICommand Members 
  }
――――
Get more controls, features, updates and technical support with Xceed Toolkit Plus for WPF
Viewing all 4964 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>