I'm not sure if I understood correctly MS-pl license. So my question is, can I use Wpftoolkit Community Edition library in a commercial/proprietary product?
Cheers,
jkovalsky
This configuration looks good. If you try the "LiveExplorer App", available on this page "https://wpftoolkit.codeplex.com/", in the "InputFields/Color" section of the LiveExplorer, do you have the same problem ? When I try it, I don't see any abbreviations.
Yeah, that one looks fine to me. I tried messing with the width (I had it manually set to 180px before) to see whether that changed anything, but both auto and 220px wide yielded the same results.
I just remembered that I pulled the package from Nuget, so I'll try downloading it directly from codeplex and including that one.
Hi,
The CheckComboBox is an ItemsControl. The ItemsControl class contains the property "ItemTemplate", which is : "Gets or sets the DataTemplate used to display each item.".
ref : http://msdn.microsoft.com/query/dev11.query?appId=Dev11IDEF1&l=EN-US&k=k(System.Windows.Controls.ItemsControl.ItemTemplate);k(ItemTemplate);k(TargetFrameworkMoniker-.NETFramework,Version%3Dv4.5);k(DevLang-csharp)&rd=true
So the ItemTemplate will set how each items in the dropbox is shown.
The ItemsControl class also contains the property "DisplayMemberPath", which is "Gets or sets a path to a value on the source object to serve as the visual representation of the object.".
ref : http://msdn.microsoft.com/en-us/library/vstudio/system.windows.controls.itemscontrol.displaymemberpath(v=vs.100).aspx
So the DisplayMemberPath will be used to get the property named "Value of DisplayMemberPath " on the object and display its content : in the dropbox and in the comboBox.
The CheckComboBox has a "Text" property, which is a string of all the selected objects, and this string is the one displayed in the comboBox. When the selection changes, in CheckComboBox.GetItemDisplayValue( object item ), if "DisplayMemberPath" is not null, the "Value of DisplayMemberPath" is obtained on each selectedObject to build the CheckComboBox.Text property. That is why the comboBox has the correct text when "DisplayMemberPath" is used.
Bu if the property CheckComboBox.ItemTemplate is used, we have no ways of knowing what property is used to display the objects. That is why the object name is returned as the content of the CheckComboBox.Text property.
Hi,
In v2.3, there won't be any crashes related to arrays in CollectionControl (or PropertyGrid using CollectionControls).
<DataGridTemplateColumn.CellEditingTemplate>
<DataTemplate>
<Grid Background="AliceBlue" FocusManager.FocusedElement="{Binding ElementName=intUpDown}">
<xwt:IntegerUpDown Value="{Binding Age}" Name="intUpDown" SelectAllOnGotFocus="True" GotFocus="intUpDown_GotFocus">
</xwt:IntegerUpDown>
</Grid>
</DataTemplate>
</DataGridTemplateColumn.CellEditingTemplate>
Hi:This issue will be fixed in v2.4.
<DataTemplate x:Key="MyDataTemplate">
<Grid Background="AliceBlue">
<xctk:IntegerUpDown Value="{Binding Age}"
Name="intUpDown"
AutoSelectBehavior="OnFocus"/>
</Grid>
<DataTemplate.Triggers>
<Trigger SourceName="intUpDown"
Property="IsVisible"
Value="True">
<Setter TargetName="intUpDown"
Property="FocusManager.FocusedElement"
Value="{Binding ElementName=intUpDown}" />
</Trigger>
</DataTemplate.Triggers>
</DataTemplate>
<Style x:Key="MessageBoxStyle"
TargetType="xctk:MessageBox">
<Setter Property="Background"
Value="Green" />
<Setter Property="ImageSource"
Value="Bold16.png" />
</Style>
<xctk:WindowContainer>
<xctk:MessageBox x:Name="_messageBox"
Text="This is a MessageBox"
Caption="Message Box Title"
Style="{StaticResource MessageBoxStyle}"/>
</xctk:WindowContainer>
Hi,
> So the DisplayMemberPath will be used to get the property named "Value of DisplayMemberPath " on the object and display its content : in the dropbox and in the comboBox.
In my case __DisplayMemberPath__ does not set correct content for __both__ dropbox and comboBox.The content of combobox(the "Text" property) is correct but the dropdown shows objects names. I used ItemTemplate as an alternative way but as I said it does not work either(reverses the problem between combobox and dropdown).
Hi,
Using v2.1 of the Toolkit, I can set the DisplayMemberPath on the CheckComboBox and the ComboBox AND its dropBox displays correctly. Here's my complete sample :
```
<Grid>
<xctk:CheckComboBox x:Name="_checkComboBox"
HorizontalAlignment="Stretch"
Height="22"
VerticalAlignment="Stretch"
ItemsSource="{Binding Genders}"
SelectedItemsOverride="{Binding SelectedGenders}"
DisplayMemberPath="Title"/>
</Grid>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
_checkComboBox.DataContext = this;
this.Genders = new ObservableCollection<Gender>()
{
new Gender() { Title = "Man" },
new Gender() { Title = "Woman" },
};
this.SelectedGenders = new ObservableCollection<Gender>();
}
public ObservableCollection<Gender> Genders
{
get;
set;
}
public ObservableCollection<Gender> SelectedGenders
{
get;
set;
}
}
public class Gender
{
public string Title
{
get;
set;
}
}
```
Thanks for your answer,
I exactly write your code in my project, and it does not worked!
For double check I write your code in a new project and it worked correctly!!!!!!
I think this control has a conflict with some of other libraries in my project. I am using [MahApps](http://mahapps.com/) and maybe it cause the problem.