New Comment on "ChildWindow"
Reviewed: Extended WPF Toolkit - 2.2.1 (jul 01, 2014)
New Post: DatagGrid: 'ScrollTip' ControlTemplate TargetType does not match templated type 'ScrollTip'
v2.3 is already available for the "Plus Edition" users of the Toolkit, since this edition is always one version ahead : https://wpftoolkit.codeplex.com/wikipage?title=Compare%20Editions.
No official dates for the release of v2.4 bu it shouldn't be too long.
New Comment on "ChildWindow"
Created Unassigned: EditorComboBoxDefinition ItemsSource [21116]
I am trying to use the Propertygrid (Plus version) to build a dynamic properties list.
I have been looking at the Custom Properties List examples but I am struggling to populate a combobox
with a list of string values built at runtime. I can't use an enum as I don't know the available values until a database is read.
I'm using MVVM and have bound my view to a view model.
I have created a new test class that contains a List of available strings and the currently selected string.
I am binding the test class MyData to the propertygrid properties source as in the example
```
public class ObjectWithNames
{
public ObservableCollection<string> Names { get; set; }
public string ObjectName { get; set; }
public override string ToString()
{
return ObjectName;
}
}
public class MyData
{
public MyData(string name, object value, string category)
{
this.MyName = name;
this.MyValue = value;
this.Category = category;
}
public MyData(string name, object value)
{
this.MyName = name;
this.MyValue = value;
this.Category = "Misc";
}
public string Category { get; set; }
public string MyName { get; set; }
public object MyValue { get; set; }
}
```
In My View Model I have a list of MyData objects
```
public ObservableCollection<object> SelectedLru
{
get { return _properties; }
}
private void BuildDummyProperties()
{
...
_properties.Add(new MyData("TestNames", (ObjectWithNames)new ObjectWithNames() { ObjectName = "Option 1", Names = new ObservableCollection<string>() { "Option 1", "Option 2" } }));
...
}
```
My View binds the properties source to the list of mydata objects.
I then set the xctk:EditorComboBoxDefinition TargetProperties to my test class ObjectWithNames.
```
<xctk:PropertyGrid x:Name="propertyGrid" Grid.Row="2"
PropertiesSource="{Binding SelectedLru}"
PropertyNameBinding="{Binding MyName}"
PropertyValueBinding="{Binding MyValue}">
<xctk:PropertyGrid.CategoryGroupDescription>
<PropertyGroupDescription PropertyName="Category"/>
</xctk:PropertyGrid.CategoryGroupDescription>
<xctk:PropertyGrid.Resources>
<local:MyConverter x:Key="myConverter"/>
</xctk:PropertyGrid.Resources>
<xctk:PropertyGrid.EditorDefinitions>
<xctk:EditorComboBoxDefinition TargetProperties="{x:Type local:ObjectWithNames}"
ItemsSource="{Binding MyValue.Names}
SelectedItemBinding="{Binding MyValue, Converter={StaticResource myConverter}" />
</xctk:PropertyGrid.EditorDefinitions>
</xctk:PropertyGrid>
```
This all works when the combobox items source is a static resource as in the example
```
<x:Array x:Key="comboSource1" Type="s:String" >
<s:String>String Value 1</s:String>
<s:String>String Value 2</s:String>
<s:String>String Value 3</s:String>
</x:Array>
```
However I am struggling to work out how to set the items source to the collection of strings in the ObjectWithNames class. I have tried using a Converter to see what is going on but that never seems to be called.
```
<xctk:EditorComboBoxDefinition TargetProperties="{x:Type local:ObjectWithNames}"
ItemsSource="{Binding MyValue, Converter={StaticResource myValuesConverter}"
SelectedItemBinding="{Binding MyValue, Converter={StaticResource myConverter}"
```
Any ideas would be appreciated. Is there an easier way to build the combo box items dynamically or at runtime?
Cheers
Jonathan
Commented Unassigned: EditorComboBoxDefinition ItemsSource [21116]
I am trying to use the Propertygrid (Plus version) to build a dynamic properties list.
I have been looking at the Custom Properties List examples but I am struggling to populate a combobox
with a list of string values built at runtime. I can't use an enum as I don't know the available values until a database is read.
I'm using MVVM and have bound my view to a view model.
I have created a new test class that contains a List of available strings and the currently selected string.
I am binding the test class MyData to the propertygrid properties source as in the example
```
public class ObjectWithNames
{
public ObservableCollection<string> Names { get; set; }
public string ObjectName { get; set; }
public override string ToString()
{
return ObjectName;
}
}
public class MyData
{
public MyData(string name, object value, string category)
{
this.MyName = name;
this.MyValue = value;
this.Category = category;
}
public MyData(string name, object value)
{
this.MyName = name;
this.MyValue = value;
this.Category = "Misc";
}
public string Category { get; set; }
public string MyName { get; set; }
public object MyValue { get; set; }
}
```
In My View Model I have a list of MyData objects
```
public ObservableCollection<object> SelectedLru
{
get { return _properties; }
}
private void BuildDummyProperties()
{
...
_properties.Add(new MyData("TestNames", (ObjectWithNames)new ObjectWithNames() { ObjectName = "Option 1", Names = new ObservableCollection<string>() { "Option 1", "Option 2" } }));
...
}
```
My View binds the properties source to the list of mydata objects.
I then set the xctk:EditorComboBoxDefinition TargetProperties to my test class ObjectWithNames.
```
<xctk:PropertyGrid x:Name="propertyGrid" Grid.Row="2"
PropertiesSource="{Binding SelectedLru}"
PropertyNameBinding="{Binding MyName}"
PropertyValueBinding="{Binding MyValue}">
<xctk:PropertyGrid.CategoryGroupDescription>
<PropertyGroupDescription PropertyName="Category"/>
</xctk:PropertyGrid.CategoryGroupDescription>
<xctk:PropertyGrid.Resources>
<local:MyConverter x:Key="myConverter"/>
</xctk:PropertyGrid.Resources>
<xctk:PropertyGrid.EditorDefinitions>
<xctk:EditorComboBoxDefinition TargetProperties="{x:Type local:ObjectWithNames}"
ItemsSource="{Binding MyValue.Names}
SelectedItemBinding="{Binding MyValue, Converter={StaticResource myConverter}" />
</xctk:PropertyGrid.EditorDefinitions>
</xctk:PropertyGrid>
```
This all works when the combobox items source is a static resource as in the example
```
<x:Array x:Key="comboSource1" Type="s:String" >
<s:String>String Value 1</s:String>
<s:String>String Value 2</s:String>
<s:String>String Value 3</s:String>
</x:Array>
```
However I am struggling to work out how to set the items source to the collection of strings in the ObjectWithNames class. I have tried using a Converter to see what is going on but that never seems to be called.
```
<xctk:EditorComboBoxDefinition TargetProperties="{x:Type local:ObjectWithNames}"
ItemsSource="{Binding MyValue, Converter={StaticResource myValuesConverter}"
SelectedItemBinding="{Binding MyValue, Converter={StaticResource myConverter}"
```
Any ideas would be appreciated. Is there an easier way to build the combo box items dynamically or at runtime?
Cheers
Jonathan
Comments: ** Comment from web user: BoucherS **
Hi,
Binding of ComboBox.ItemsSource doesn't work because binding is resolved on xctk:EditorComboBoxDefinition, which doesn't inherit the datacontext from PropertyGrid.
Try doing this :
```
<xctk:EditorComboBoxDefinition TargetProperties="{x:Type local:ObjectWithNames}"
SelectedItemBinding="{Binding MyValue }">
<xctk:EditorComboBoxDefinition.EditingElementStyle>
<Style>
<Setter Property="ComboBox.ItemsSource"
Value="{Binding Path=MyValue.Names}" />
</Style>
</xctk:EditorComboBoxDefinition.EditingElementStyle>
</xctk:EditorComboBoxDefinition>
</xctk:PropertyGrid.EditorDefinitions>
```
Based on http://social.msdn.microsoft.com/Forums/vstudio/en-US/b4b13a72-47f9-452f-85c6-6c4b5b606df5/systemwindowsdata-error-2-cannot-find-governing-frameworkelement-or-frameworkcontentelement?forum=wpf
New Post: DatagGrid: 'ScrollTip' ControlTemplate TargetType does not match templated type 'ScrollTip'
New Post: Datagrid GetContainerFromItem returns null
New Post: XCeed DataGrid for WPF Binding
I have another question relating to this. My program dynamically changes the color and text on some of the cells. However, these changes don't show up immediately, but if I scroll these cells out of view and bring them back, they are drawn with the proper contents. Is there a way to make sure that the changes I make to the underlying data is reflected immediately on the Grid?
Thanks a lot for all your help!
Alex
New Comment on "WatermarkTextBox"
New Post: ComboBox in CollectionControl
I understand that the default editor for an Enum type is a ComboBox but I would like to be able to use a ComboBox to select items from a Collection.
For example, consider the ListOfInt32, ListOfPerson or ListOfStrings fields in the PropertyGrid Default Editors example available in the LiveExplorer example. Is it possible to show a combobox that contains the Items rather than using the PrimitiveTypeCollectionEditor?!
CollectionEditor ComboBox Image
Many thanks for any help.
Commented Unassigned: EditorComboBoxDefinition ItemsSource [21116]
I am trying to use the Propertygrid (Plus version) to build a dynamic properties list.
I have been looking at the Custom Properties List examples but I am struggling to populate a combobox
with a list of string values built at runtime. I can't use an enum as I don't know the available values until a database is read.
I'm using MVVM and have bound my view to a view model.
I have created a new test class that contains a List of available strings and the currently selected string.
I am binding the test class MyData to the propertygrid properties source as in the example
```
public class ObjectWithNames
{
public ObservableCollection<string> Names { get; set; }
public string ObjectName { get; set; }
public override string ToString()
{
return ObjectName;
}
}
public class MyData
{
public MyData(string name, object value, string category)
{
this.MyName = name;
this.MyValue = value;
this.Category = category;
}
public MyData(string name, object value)
{
this.MyName = name;
this.MyValue = value;
this.Category = "Misc";
}
public string Category { get; set; }
public string MyName { get; set; }
public object MyValue { get; set; }
}
```
In My View Model I have a list of MyData objects
```
public ObservableCollection<object> SelectedLru
{
get { return _properties; }
}
private void BuildDummyProperties()
{
...
_properties.Add(new MyData("TestNames", (ObjectWithNames)new ObjectWithNames() { ObjectName = "Option 1", Names = new ObservableCollection<string>() { "Option 1", "Option 2" } }));
...
}
```
My View binds the properties source to the list of mydata objects.
I then set the xctk:EditorComboBoxDefinition TargetProperties to my test class ObjectWithNames.
```
<xctk:PropertyGrid x:Name="propertyGrid" Grid.Row="2"
PropertiesSource="{Binding SelectedLru}"
PropertyNameBinding="{Binding MyName}"
PropertyValueBinding="{Binding MyValue}">
<xctk:PropertyGrid.CategoryGroupDescription>
<PropertyGroupDescription PropertyName="Category"/>
</xctk:PropertyGrid.CategoryGroupDescription>
<xctk:PropertyGrid.Resources>
<local:MyConverter x:Key="myConverter"/>
</xctk:PropertyGrid.Resources>
<xctk:PropertyGrid.EditorDefinitions>
<xctk:EditorComboBoxDefinition TargetProperties="{x:Type local:ObjectWithNames}"
ItemsSource="{Binding MyValue.Names}
SelectedItemBinding="{Binding MyValue, Converter={StaticResource myConverter}" />
</xctk:PropertyGrid.EditorDefinitions>
</xctk:PropertyGrid>
```
This all works when the combobox items source is a static resource as in the example
```
<x:Array x:Key="comboSource1" Type="s:String" >
<s:String>String Value 1</s:String>
<s:String>String Value 2</s:String>
<s:String>String Value 3</s:String>
</x:Array>
```
However I am struggling to work out how to set the items source to the collection of strings in the ObjectWithNames class. I have tried using a Converter to see what is going on but that never seems to be called.
```
<xctk:EditorComboBoxDefinition TargetProperties="{x:Type local:ObjectWithNames}"
ItemsSource="{Binding MyValue, Converter={StaticResource myValuesConverter}"
SelectedItemBinding="{Binding MyValue, Converter={StaticResource myConverter}"
```
Any ideas would be appreciated. Is there an easier way to build the combo box items dynamically or at runtime?
Cheers
Jonathan
Comments: ** Comment from web user: jwoolcock **
Thank you that has addressed the issue for a dynamic combo box.
I am having a similar issue configuring the EditorIntegerUpDownDefinition at runtime.
I am binding the following object to the property grid.
The value is the current value, with the minimum, maximum and step values read from a database.
```
public class MinMaxParameter
{
public int Minimum { get; set; }
public int Maximum { get; set; }
public int Step { get; set; }
public int Value { get; set; }
}
```
When I set the min,max and step to values to actual values it works
```
<xctk:EditorIntegerUpDownDefinition TargetProperties="{x:Type local:MinMaxParameter}"
Binding="{Binding Path=PropertyValue.Value}"
Maximum="100" Step="10"
Minimum="10"
>
```
However when I set them to the bound values it doesn't work.
```
<xctk:EditorIntegerUpDownDefinition TargetProperties="{x:Type local:MinMaxParameter}"
Binding="{Binding Path=PropertyValue.Value}"
Maximum="{Binding Path=PropertyValue.Maximum}"
Minimum="{Binding Path=PropertyValue.Minimum}">
```
New Post: WPF Datagrid Update/Refresh
I have a WPF Datagrid whose background colour, text are bound to data objects representing cells in a table via a template. When I update these properties on the Items in my collection, the grid doesn't update immediately, but when I scroll away and scroll back the table is shown with the proper contents, meaning the data is properly updated.
I could probably find some work around to this, but I would much rather do things the right way. Is there something I can do to force the grid to update? Is this behaviour caused by the fact that I'm using a template?
Thanks!
Alex
New Post: AvalonDock TextBox with validation loses error template when tab changed
<Border>
<AdornerDecorator>
<StackPanel>
...
</StackPanel>
</AdornerDecorator>
</Border>
... but how can I do this with AvalonDock?New Post: On Mouseclick application crashes
We have a grid that has two textbox placed next to one another. If I enter a value in one textbox and tab out and then click back on the first textbox the application crashes. It works fine if I click somewhere on the page and then click on the first textbox.
Below is the dump. Can someone help?
000000cac1dea218 00007ffad72c5bf8 [HelperMethodFrame: 000000cac1dea218]
000000cac1dea300 00007ffa6dc3d555 Xceed.Wpf.DataGrid.Stats.AverageFunction.GetResult()
000000cac1dea410 00007ffa6dc3bbf1 Xceed.Wpf.DataGrid.DataGridCollectionViewGroup.CalculateStatFunctionValue(Xceed.Wpf.DataGrid.Stats.StatFunction, Xceed.Wpf.DataGrid.DataGridCollectionView)
000000cac1dea480 00007ffa6dc3b9af Xceed.Wpf.DataGrid.DataGridCollectionViewGroup.GetStatFunctionValue(System.String)
000000cac1dea4c0 00007ffaac0b0139 MS.Internal.Data.PropertyPathWorker.GetValue(System.Object, Int32) [f:\dd\wpf\src\Framework\MS\Internal\Data\PropertyPathWorker.cs @ 254]
000000cac1dea570 00007ffaac0acf31 MS.Internal.Data.PropertyPathWorker.RawValue(Int32) [f:\dd\wpf\src\Framework\MS\Internal\Data\PropertyPathWorker.cs @ 1506]
000000cac1dea600 00007ffaac0afd20 MS.Internal.Data.ClrBindingWorker.RawValue() [f:\dd\wpf\src\Framework\MS\Internal\Data\CLRBindingWorker.cs @ 235]
000000cac1dea640 00007ffaac0af874 System.Windows.Data.BindingExpression.TransferValue(System.Object, Boolean) [f:\dd\wpf\src\Framework\System\Windows\Data\BindingExpression.cs @ 1283]
000000cac1dea6d0 00007ffaac0acc8c MS.Internal.Data.PropertyPathWorker.UpdateSourceValueState(Int32, System.ComponentModel.ICollectionView, System.Object, Boolean) [f:\dd\wpf\src\Framework\MS\Internal\Data\PropertyPathWorker.cs @ 647]
000000cac1dea750 00007ffaac0c653b MS.Internal.Data.PropertyPathWorker.OnDependencyPropertyChanged(System.Windows.DependencyObject, System.Windows.DependencyProperty, Boolean) [f:\dd\wpf\src\Framework\MS\Internal\Data\PropertyPathWorker.cs @ 519]
000000cac1dea7c0 00007ffaac0c63ae System.Windows.Data.BindingExpression.HandlePropertyInvalidation(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs) [f:\dd\wpf\src\Framework\System\Windows\Data\BindingExpression.cs @ 2657]
000000cac1dea820 00007ffaac0c62e7 System.Windows.Data.BindingExpressionBase.OnPropertyInvalidation(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs) [f:\dd\wpf\src\Framework\System\Windows\Data\BindingExpressionBase.cs @ 453]
000000cac1dea8c0 00007ffaac0c6050 System.Windows.Data.BindingExpression.OnPropertyInvalidation(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs) [f:\dd\wpf\src\Framework\System\Windows\Data\BindingExpression.cs @ 255]
000000cac1dea960 00007ffaae225823 System.Windows.DependentList.InvalidateDependents(System.Windows.DependencyObject, System.Windows.DependencyPropertyChangedEventArgs) [f:\dd\wpf\src\Base\System\Windows\DependentList.cs @ 63]
000000cac1deaa00 00007ffaae21518e System.Windows.DependencyObject.NotifyPropertyChange(System.Windows.DependencyPropertyChangedEventArgs) [f:\dd\wpf\src\Base\System\Windows\DependencyObject.cs @ 1777]
000000cac1deab70 00007ffaae211f2c System.Windows.DependencyObject.UpdateEffectiveValue(System.Windows.EntryIndex, System.Windows.DependencyProperty, System.Windows.PropertyMetadata, System.Windows.EffectiveValueEntry, System.Windows.EffectiveValueEntry ByRef, Boolean, Boolean, System.Windows.OperationType) [f:\dd\wpf\src\Base\System\Windows\DependencyObject.cs @ 1570]
000000cac1deaea0 00007ffaac099fd5 System.Windows.TreeWalkHelper.OnInheritablePropertyChanged(System.Windows.DependencyObject, System.Windows.InheritablePropertyChangeInfo, Boolean) [f:\dd\wpf\src\Framework\System\Windows\TreeWalkHelper.cs @ 1000]
000000cac1deb030 00007ffaac099b01 System.Windows.DescendentsWalker
1[[System.Windows.InheritablePropertyChangeInfo, PresentationFramework]]._VisitNode(System.Windows.DependencyObject, Boolean) [f:\dd\wpf\src\Framework\System\Windows\DescendentsWalker.cs @ 429]
000000cac1deb0d0 00007ffaac090eba System.Windows.DescendentsWalker
1[[System.Windows.InheritablePropertyChangeInfo, PresentationFramework]].WalkFrameworkElementLogicalThenVisualChildren(System.Windows.FrameworkElement, Boolean) [f:\dd\wpf\src\Framework\System\Windows\DescendentsWalker.cs @ 355]000000cac1deb190 00007ffaac090d4b System.Windows.DescendentsWalker
1[[System.Windows.InheritablePropertyChangeInfo, PresentationFramework]].IterateChildren(System.Windows.DependencyObject) [f:\dd\wpf\src\Framework\System\Windows\DescendentsWalker.cs @ 76]
000000cac1deb1d0 00007ffaac099b1d System.Windows.DescendentsWalker
1[[System.Windows.InheritablePropertyChangeInfo, PresentationFramework]]._VisitNode(System.Windows.DependencyObject, Boolean) [f:\dd\wpf\src\Framework\System\Windows\DescendentsWalker.cs @ 429]000000cac1deb270 00007ffaac0910f7 System.Windows.DescendentsWalker
1[[System.Windows.InheritablePropertyChangeInfo, PresentationFramework]].WalkLogicalChildren(System.Windows.FrameworkElement, System.Windows.FrameworkContentElement, System.Collections.IEnumerator) [f:\dd\wpf\src\Framework\System\Windows\DescendentsWalker.cs @ 219]
000000cac1deb2e0 00007ffaac090df6 System.Windows.DescendentsWalker
1[[System.Windows.InheritablePropertyChangeInfo, PresentationFramework]].WalkFrameworkElementLogicalThenVisualChildren(System.Windows.FrameworkElement, Boolean) [f:\dd\wpf\src\Framework\System\Windows\DescendentsWalker.cs @ 355]000000cac1deb3a0 00007ffaac090d4b System.Windows.DescendentsWalker
1[[System.Windows.InheritablePropertyChangeInfo, PresentationFramework]].IterateChildren(System.Windows.DependencyObject) [f:\dd\wpf\src\Framework\System\Windows\DescendentsWalker.cs @ 76]
000000cac1deb3e0 00007ffaac099b1d System.Windows.DescendentsWalker
1[[System.Windows.InheritablePropertyChangeInfo, PresentationFramework]]._VisitNode(System.Windows.DependencyObject, Boolean) [f:\dd\wpf\src\Framework\System\Windows\DescendentsWalker.cs @ 429]000000cac1deb480 00007ffaac090eba System.Windows.DescendentsWalker
1[[System.Windows.InheritablePropertyChangeInfo, PresentationFramework]].WalkFrameworkElementLogicalThenVisualChildren(System.Windows.FrameworkElement, Boolean) [f:\dd\wpf\src\Framework\System\Windows\DescendentsWalker.cs @ 355]
000000cac1deb540 00007ffaac090d4b System.Windows.DescendentsWalker
1[[System.Windows.InheritablePropertyChangeInfo, PresentationFramework]].IterateChildren(System.Windows.DependencyObject) [f:\dd\wpf\src\Framework\System\Windows\DescendentsWalker.cs @ 76]000000cac1deb580 00007ffaac099b1d System.Windows.DescendentsWalker
1[[System.Windows.InheritablePropertyChangeInfo, PresentationFramework]]._VisitNode(System.Windows.DependencyObject, Boolean) [f:\dd\wpf\src\Framework\System\Windows\DescendentsWalker.cs @ 429]
000000cac1deb620 00007ffaac0910f7 System.Windows.DescendentsWalker
1[[System.Windows.InheritablePropertyChangeInfo, PresentationFramework]].WalkLogicalChildren(System.Windows.FrameworkElement, System.Windows.FrameworkContentElement, System.Collections.IEnumerator) [f:\dd\wpf\src\Framework\System\Windows\DescendentsWalker.cs @ 219]000000cac1deb690 00007ffaac090df6 System.Windows.DescendentsWalker
1[[System.Windows.InheritablePropertyChangeInfo, PresentationFramework]].WalkFrameworkElementLogicalThenVisualChildren(System.Windows.FrameworkElement, Boolean) [f:\dd\wpf\src\Framework\System\Windows\DescendentsWalker.cs @ 355]
000000cac1deb750 00007ffaac090d4b System.Windows.DescendentsWalker
1[[System.Windows.InheritablePropertyChangeInfo, PresentationFramework]].IterateChildren(System.Windows.DependencyObject) [f:\dd\wpf\src\Framework\System\Windows\DescendentsWalker.cs @ 76]000000cac1deb790 00007ffaac099b1d System.Windows.DescendentsWalker
1[[System.Windows.InheritablePropertyChangeInfo, PresentationFramework]]._VisitNode(System.Windows.DependencyObject, Boolean) [f:\dd\wpf\src\Framework\System\Windows\DescendentsWalker.cs @ 429]
000000cac1deb830 00007ffaac090eba System.Windows.DescendentsWalker
1[[System.Windows.InheritablePropertyChangeInfo, PresentationFramework]].WalkFrameworkElementLogicalThenVisualChildren(System.Windows.FrameworkElement, Boolean) [f:\dd\wpf\src\Framework\System\Windows\DescendentsWalker.cs @ 355]000000cac1deb8f0 00007ffaac090d4b System.Windows.DescendentsWalker`1[[System.Windows.InheritablePropertyChangeInfo, PresentationFramework]].IterateChildren(System.Windows.DependencyObject) [f:\dd\wpf\src\Framework\System\Windows\DescendentsWalker.cs @ 76]
New Post: PropertyGrid - Is it possible to display more columns/objects?
I would like to use PropertyGrid to display values of all properties of two objects of the same Type. Lets say its type (class) called "Measurement", and I have two instances of this class called "Normals" and "Actual" and I want to display each as a column in property grid.. so from left to right would be name-of-property | values-on-Normals | values-on-Actual. Ideally I would like to have the ability to set header row for each column. Is this possible with PropertyGrid? If not, what other compnent/approach would you recommend?
Thanks.
urza
Updated Wiki: Professional DataGrid
Advanced DataGrid
The normal datagrid included in both the Community and Plus Edition of Extended WPF Toolkit is a rock-solid, high performance product with zero-lag data virtualization, the ability to handle large datasets, and with many core features. Xceed offers an even more advanced version of this datagrid with certain added features. You can purchase it separately, or try it for 45 days here, but it is also included in the Xceed Business Suite for WPF as well.The advanced version of the DataGrid includes the following additional features:
- Master / Detail View
- Tree Grid View
- Card View
- 3D View
- Filter Row
- Insertion Row
- Auto-filter Popup
- Statistics Rows and Summary Rows
- Print / Preview
- Exporting (CSV, Excel, etc.)
- Column Chooser
- Column Splitter Control
- Persist User Settings
- Merged Column Headers
- Design-time Support
- Excel-like Drag-to-Select Rows and Cells
- Asynchronous Binding Mode
Master / Detail View
When a grid is in a table-view layout, its data items can display detail data that is usually provided by the detail descriptions defined in the DataGridCollectionView or DataGridCollectionViewSource to which the grid is bound. By default, detail descriptions are automatically created for most detail relation types; however, they can also be explicitly defined.Tree Grid View
Represents a table-view layout similar to TableflowView, in which rows are laid out horizontally as in traditional grid-like styles, but detail columns are aligned with the columns of the master, and one column displays data using a tree-structure.Like TableflowView, it provides animated smooth scrolling, sticky group headers and sticky master-detail master row and headers, full-column animated drag and drop reordering.
Card View
The CardView and CompactCardView classes provide card-view layouts for the data items in a grid. Either layout can be used to display data items as cards; however, the compact card-view layout applies well when a database has many columns but few of the fields contain data. In this case, the fields that do not contain data will not be displayed in the cards, giving them a more compact appearance.3D View
The Cardflow™ 3D view, which is represented by the CardflowView3D class, provides a 3-dimensional card-view layout for the data items in a grid and allows various card "surfaces" to display data using customized, theme-defined surface configurations.Filter Row
The FilterRow class represents a row in which values can be entered to filter the items in the corresponding columns.Insertion Row
The InsertionRow class represents a row in which values can be entered to insert a new item to the grid.Auto-filter Popup
In addition to the native CollectionView filtering, the DataGridCollectionView and DataGridDetailDescription classes also support automatic filtering, which provides Excel-like end-user filtering according to the distinct values of each column. Automatic filtering can be enabled by setting the AutoFilterMode property to And or Or (by default, None), indicating whether data items will be filtered according to all or at least one of the filtering criteria defined by each column's auto-filter control. The DistinctValuesConstraint property can also be set to determine if the distinct values are to be filtered according to the result of previous auto-filtering operations.Statistics Rows and Summary Rows
The StatRow class represents a row that can be used to display statistical results.Print / Preview
The appearance of a grid when it is printed or exported is determined by the view assigned to a grid's PrintView property and the theme assigned to the view's Theme property. When a grid is printed using the default view and theme, the resulting pages will not have headers or footers and only a column-manager row will be contained in a grid's fixed-header section regardless of the configuration of the runtime grid.The ShowPrintPreviewWindow and ShowPrintPreviewPopup methods provide print preview capabilities. ShowPrintPreviewPopup should be used when the application is being deployed as an XBAP, as XBAP applications cannot open new windows.
Exporting (CSV, Excel, etc.)
Xceed DataGrid for WPF supports exporting to the XML spreadsheet format (xmlss). These files can be loaded in Excel 2002 and up as well as through the Microsoft Office XP Web Components Spreadsheet Component. The DataGrid also supports exporting to the CSV format, which is compatible with a wide variety of applications.The DataGridControl class also exposes the ExportToXps method, which allows a grid to be exported as an XPS document.
Column Chooser
The columns that are displayed in a grid can be chosen by the user through the column-chooser context menu, which can be enabled by setting the AllowColumnChooser defined on the view to true. A column's ShowInColumnChooser property determines whether a column's title is displayed in the menu, allowing its visibility to be manipulated by an end user. By default, the column-chooser context menu displays the titles of the columns in the same order as the they are positioned; however, through the ColumnChooserSortOrder property, the order can be changed to sort the titles alphabetically.Column Splitter Control
When a grid is in a table-view layout, the first n columns can be fixed so that they do not scroll with the grid content. Fixed columns are separated from their scrollable counterparts by a fixed-column splitter, which can be dragged to add or remove fixed columns. Likewise, column-manager cells can be dragged to the left or right of the fixed-column splitter to add or remove fixed columns. The appearance of the fixed-column splitter can be defined for each row type.Persist User Settings
The settings of a grid and its elements can be persisted and re-applied using the SaveUserSettings and LoadUserSettings methods, respectively. By default, column widths, visibilities, positions, and fixed-column counts as well as grouping and sorting criteria are persisted; merged columns, their positions, and their visibilities can also be persisted. However, these settings can be modified when calling the SaveUserSettings and LoadUserSettings methods.Merged Column Headers
Merged column headers can be used to present data more clearly and logically. They are displayed in the FixedHeaders section of a grid. Columns can be grouped ("merged") under these merged headers, as can other groups of columns. Merged headers and their columns can be moved (drag-and-drop, programmatically) and removed / added back.Design-time Support
Xceed DataGrid for WPF provides design-time support for Visual Studio 2008, 2010, and 2012 and Expression Blend. In Visual Studio, the DataGridControl control will appear in the toolbox under the Xceed tab and can be added to the design surface by double-clicking on the control or through drag and drop. It's properties can then be modified through the Visual Studio property grid or by using the Xceed DataGrid for WPF Configuration Window.Excel-like Drag-to-Select Rows and Cells
The datagrid allows users to select multiple items or cells using Left-Click and then dragging the mouse within the datagrid. This allows range selection to be performed without having to hold the Shift key on the keyboard.To activate this feature, set the DataGrid's AllowDrag property to true, and the DragBehavior property to "Select". The View must be a valid instance or subclass of TableView (ex. TableFlowView, TreeGridflowView).
Asynchronous Binding Mode
The IsAsync property can be used when the get accessor of your binding source property might take a long time. One example is an image property with a get accessor that downloads from the Web. Setting IsAsync to true avoids blocking the UI while the download occurs.While waiting for the value to arrive, the binding reports the value set on the FallbackValue property, if one is available, or the default value of the binding target property.
---
Updated Wiki: Professional DataGrid
Advanced DataGrid
The normal datagrid included in both the Community and Plus Edition of Extended WPF Toolkit is a rock-solid, high performance product with zero-lag data virtualization, the ability to handle large datasets, and with many core features. Xceed offers an advanced version of this datagrid with certain added features. You can purchase it separately, or try it for 45 days here, but it is also included in the Xceed Business Suite for WPF as well.The advanced version of the DataGrid includes the following additional features:
- Master / Detail View
- Tree Grid View
- Card View
- 3D View
- Filter Row
- Insertion Row
- Auto-filter Popup
- Statistics Rows and Summary Rows
- Print / Preview
- Exporting (CSV, Excel, etc.)
- Column Chooser
- Column Splitter Control
- Persist User Settings
- Merged Column Headers
- Design-time Support
- Excel-like Drag-to-Select Rows and Cells
- Asynchronous Binding Mode
Master / Detail View
When a grid is in a table-view layout, its data items can display detail data that is usually provided by the detail descriptions defined in the DataGridCollectionView or DataGridCollectionViewSource to which the grid is bound. By default, detail descriptions are automatically created for most detail relation types; however, they can also be explicitly defined.Tree Grid View
Represents a table-view layout similar to TableflowView, in which rows are laid out horizontally as in traditional grid-like styles, but detail columns are aligned with the columns of the master, and one column displays data using a tree-structure.Like TableflowView, it provides animated smooth scrolling, sticky group headers and sticky master-detail master row and headers, full-column animated drag and drop reordering.
Card View
The CardView and CompactCardView classes provide card-view layouts for the data items in a grid. Either layout can be used to display data items as cards; however, the compact card-view layout applies well when a database has many columns but few of the fields contain data. In this case, the fields that do not contain data will not be displayed in the cards, giving them a more compact appearance.3D View
The Cardflow™ 3D view, which is represented by the CardflowView3D class, provides a 3-dimensional card-view layout for the data items in a grid and allows various card "surfaces" to display data using customized, theme-defined surface configurations.Filter Row
The FilterRow class represents a row in which values can be entered to filter the items in the corresponding columns.Insertion Row
The InsertionRow class represents a row in which values can be entered to insert a new item to the grid.Auto-filter Popup
In addition to the native CollectionView filtering, the DataGridCollectionView and DataGridDetailDescription classes also support automatic filtering, which provides Excel-like end-user filtering according to the distinct values of each column. Automatic filtering can be enabled by setting the AutoFilterMode property to And or Or (by default, None), indicating whether data items will be filtered according to all or at least one of the filtering criteria defined by each column's auto-filter control. The DistinctValuesConstraint property can also be set to determine if the distinct values are to be filtered according to the result of previous auto-filtering operations.Statistics Rows and Summary Rows
The StatRow class represents a row that can be used to display statistical results.Print / Preview
The appearance of a grid when it is printed or exported is determined by the view assigned to a grid's PrintView property and the theme assigned to the view's Theme property. When a grid is printed using the default view and theme, the resulting pages will not have headers or footers and only a column-manager row will be contained in a grid's fixed-header section regardless of the configuration of the runtime grid.The ShowPrintPreviewWindow and ShowPrintPreviewPopup methods provide print preview capabilities. ShowPrintPreviewPopup should be used when the application is being deployed as an XBAP, as XBAP applications cannot open new windows.
Exporting (CSV, Excel, etc.)
Xceed DataGrid for WPF supports exporting to the XML spreadsheet format (xmlss). These files can be loaded in Excel 2002 and up as well as through the Microsoft Office XP Web Components Spreadsheet Component. The DataGrid also supports exporting to the CSV format, which is compatible with a wide variety of applications.The DataGridControl class also exposes the ExportToXps method, which allows a grid to be exported as an XPS document.
Column Chooser
The columns that are displayed in a grid can be chosen by the user through the column-chooser context menu, which can be enabled by setting the AllowColumnChooser defined on the view to true. A column's ShowInColumnChooser property determines whether a column's title is displayed in the menu, allowing its visibility to be manipulated by an end user. By default, the column-chooser context menu displays the titles of the columns in the same order as the they are positioned; however, through the ColumnChooserSortOrder property, the order can be changed to sort the titles alphabetically.Column Splitter Control
When a grid is in a table-view layout, the first n columns can be fixed so that they do not scroll with the grid content. Fixed columns are separated from their scrollable counterparts by a fixed-column splitter, which can be dragged to add or remove fixed columns. Likewise, column-manager cells can be dragged to the left or right of the fixed-column splitter to add or remove fixed columns. The appearance of the fixed-column splitter can be defined for each row type.Persist User Settings
The settings of a grid and its elements can be persisted and re-applied using the SaveUserSettings and LoadUserSettings methods, respectively. By default, column widths, visibilities, positions, and fixed-column counts as well as grouping and sorting criteria are persisted; merged columns, their positions, and their visibilities can also be persisted. However, these settings can be modified when calling the SaveUserSettings and LoadUserSettings methods.Merged Column Headers
Merged column headers can be used to present data more clearly and logically. They are displayed in the FixedHeaders section of a grid. Columns can be grouped ("merged") under these merged headers, as can other groups of columns. Merged headers and their columns can be moved (drag-and-drop, programmatically) and removed / added back.Design-time Support
Xceed DataGrid for WPF provides design-time support for Visual Studio 2008, 2010, and 2012 and Expression Blend. In Visual Studio, the DataGridControl control will appear in the toolbox under the Xceed tab and can be added to the design surface by double-clicking on the control or through drag and drop. It's properties can then be modified through the Visual Studio property grid or by using the Xceed DataGrid for WPF Configuration Window.Excel-like Drag-to-Select Rows and Cells
The datagrid allows users to select multiple items or cells using Left-Click and then dragging the mouse within the datagrid. This allows range selection to be performed without having to hold the Shift key on the keyboard.To activate this feature, set the DataGrid's AllowDrag property to true, and the DragBehavior property to "Select". The View must be a valid instance or subclass of TableView (ex. TableFlowView, TreeGridflowView).
Asynchronous Binding Mode
The IsAsync property can be used when the get accessor of your binding source property might take a long time. One example is an image property with a get accessor that downloads from the Web. Setting IsAsync to true avoids blocking the UI while the download occurs.While waiting for the value to arrive, the binding reports the value set on the FallbackValue property, if one is available, or the default value of the binding target property.
---
Updated Wiki: Professional DataGrid
Advanced DataGrid
The normal datagrid included in both the Community and Plus Edition of Extended WPF Toolkit is a rock-solid, high performance product with zero-lag data virtualization, the ability to handle large datasets, and with many core features. Xceed offers an advanced version of this datagrid with certain added features. You can purchase it separately, or try it for 45 days here, but it is also included in the Xceed Business Suite for WPF as well.The advanced version of the DataGrid includes the following additional features:
- Master / Detail View
- Tree Grid View
- Card View
- 3D View
- Filter Row
- Insertion Row
- Auto-filter Popup
- Statistics Rows and Summary Rows
- Print / Preview
- Exporting (CSV, Excel, etc.)
- Column Chooser
- Column Splitter Control
- Persist User Settings
- Merged Column Headers
- Design-time Support
- Excel-like Drag-to-Select Rows and Cells
- Asynchronous Binding Mode
Master / Detail View
When a grid is in a table-view layout, its data items can display detail data that is usually provided by the detail descriptions defined in the DataGridCollectionView or DataGridCollectionViewSource to which the grid is bound. By default, detail descriptions are automatically created for most detail relation types; however, they can also be explicitly defined.Tree Grid View
Represents a table-view layout similar to TableflowView, in which rows are laid out horizontally as in traditional grid-like styles, but detail columns are aligned with the columns of the master, and one column displays data using a tree-structure.Like TableflowView, it provides animated smooth scrolling, sticky group headers and sticky master-detail master row and headers, full-column animated drag and drop reordering.
Card View
The CardView and CompactCardView classes provide card-view layouts for the data items in a grid. Either layout can be used to display data items as cards; however, the compact card-view layout applies well when a database has many columns but few of the fields contain data. In this case, the fields that do not contain data will not be displayed in the cards, giving them a more compact appearance.3D View
The Cardflow™ 3D view, which is represented by the CardflowView3D class, provides a 3-dimensional card-view layout for the data items in a grid and allows various card "surfaces" to display data using customized, theme-defined surface configurations.Filter Row
The FilterRow class represents a row in which values can be entered to filter the items in the corresponding columns.Insertion Row
The InsertionRow class represents a row in which values can be entered to insert a new item to the grid.Auto-filter Popup
In addition to the native CollectionView filtering, the DataGridCollectionView and DataGridDetailDescription classes also support automatic filtering, which provides Excel-like end-user filtering according to the distinct values of each column. Automatic filtering can be enabled by setting the AutoFilterMode property to And or Or (by default, None), indicating whether data items will be filtered according to all or at least one of the filtering criteria defined by each column's auto-filter control. The DistinctValuesConstraint property can also be set to determine if the distinct values are to be filtered according to the result of previous auto-filtering operations.Statistics Rows and Summary Rows
The StatRow class represents a row that can be used to display statistical results.Print / Preview
The appearance of a grid when it is printed or exported is determined by the view assigned to a grid's PrintView property and the theme assigned to the view's Theme property. When a grid is printed using the default view and theme, the resulting pages will not have headers or footers and only a column-manager row will be contained in a grid's fixed-header section regardless of the configuration of the runtime grid.The ShowPrintPreviewWindow and ShowPrintPreviewPopup methods provide print preview capabilities. ShowPrintPreviewPopup should be used when the application is being deployed as an XBAP, as XBAP applications cannot open new windows.
Exporting (CSV, Excel, etc.)
Xceed DataGrid for WPF supports exporting to the XML spreadsheet format (xmlss). These files can be loaded in Excel 2002 and up as well as through the Microsoft Office XP Web Components Spreadsheet Component. The DataGrid also supports exporting to the CSV format, which is compatible with a wide variety of applications.The DataGridControl class also exposes the ExportToXps method, which allows a grid to be exported as an XPS document.
Column Chooser
The columns that are displayed in a grid can be chosen by the user through the column-chooser context menu, which can be enabled by setting the AllowColumnChooser defined on the view to true. A column's ShowInColumnChooser property determines whether a column's title is displayed in the menu, allowing its visibility to be manipulated by an end user. By default, the column-chooser context menu displays the titles of the columns in the same order as the they are positioned; however, through the ColumnChooserSortOrder property, the order can be changed to sort the titles alphabetically.Column Splitter Control
When a grid is in a table-view layout, the first n columns can be fixed so that they do not scroll with the grid content. Fixed columns are separated from their scrollable counterparts by a fixed-column splitter, which can be dragged to add or remove fixed columns. Likewise, column-manager cells can be dragged to the left or right of the fixed-column splitter to add or remove fixed columns. The appearance of the fixed-column splitter can be defined for each row type.Persist User Settings
The settings of a grid and its elements can be persisted and re-applied using the SaveUserSettings and LoadUserSettings methods, respectively. By default, column widths, visibilities, positions, and fixed-column counts as well as grouping and sorting criteria are persisted; merged columns, their positions, and their visibilities can also be persisted. However, these settings can be modified when calling the SaveUserSettings and LoadUserSettings methods.Merged Column Headers
Merged column headers can be used to present data more clearly and logically. They are displayed in the FixedHeaders section of a grid. Columns can be grouped ("merged") under these merged headers, as can other groups of columns. Merged headers and their columns can be moved (drag-and-drop, programmatically) and removed / added back.Design-time Support
Xceed DataGrid for WPF provides design-time support for Visual Studio 2008, 2010, and 2012 and Expression Blend. In Visual Studio, the DataGridControl control will appear in the toolbox under the Xceed tab and can be added to the design surface by double-clicking on the control or through drag and drop. It's properties can then be modified through the Visual Studio property grid or by using the Xceed DataGrid for WPF Configuration Window.Excel-like Drag-to-Select Rows and Cells
The datagrid allows users to select multiple items or cells using Left-Click and then dragging the mouse within the datagrid. This allows range selection to be performed without having to hold the Shift key on the keyboard.To activate this feature, set the DataGrid's AllowDrag property to true, and the DragBehavior property to "Select". The View must be a valid instance or subclass of TableView (ex. TableFlowView, TreeGridflowView).
Asynchronous Binding Mode
The IsAsync property can be used when the get accessor of your binding source property might take a long time. One example is an image property with a get accessor that downloads from the Web. Setting IsAsync to true avoids blocking the UI while the download occurs.While waiting for the value to arrive, the binding reports the value set on the FallbackValue property, if one is available, or the default value of the binding target property.
---
Updated Wiki: Home
Try the controls now with the Live Explorer app.
Extended WPF Toolkit™ is the number one collection of WPF controls, components and utilities for creating next generation Windows applications. Use it to build professional looking, modern, and easy to use line of business applications. The Extended WPF Toolkit project has been downloaded more than 250,000 times here and on Nuget.
The free, open source Community Edition is provided under the Microsoft Public License. The Plus Edition adds additional controls and features, email support, and is one release version ahead. The Business Suite for WPF adds the full-featured version of the industry's best datagrid and 1-year of priority support and updates.
Controls included in the Community Edition:
Additional controls and features in the Plus Edition:
Charts | ChildWindow Plus | MessageBox Plus | MultiColumnComboBox |
PileFlowPanel | PropertyGrid Plus | RadialGauge | Rating |
StyleableWindow | SwitchPanel Plus | ToggleSwitch | Ultimate ListBox |
WindowControl Plus | Metro theme | Office theme | Technical support |
1 release ahead |
Additional controls and features in the Business Suite for WPF:
Advanced DataGrid | 3D Views for WPF | Blendables for WPF | More themes |
Latest News
- June 17, 2014, released Plus Edition v2.2.1 containing 5 bug fixes (see list) and a new lower price to get the Plus Edition until August 30, 2014. Plus Edition v2.3.1 released with 6 bug fixes.
- June 2, 2014, released Plus Edition v2.3.0 containing a new controls and 30 bug fixes and improvements. Released Community Edition v2.2.0, containing two new controls and 15 bug fixes and improvements (see list).
- Feb. 20, 2014, released Plus Edition v2.2.0 containing 4 new controls and 20 bug fixes and improvements. Released Community Edition v2.1.0, containing 70 bug fixes and improvements (see list).
Action items
- Enjoy WPF!
- Please rate this release and write something positive. It's at the bottom of the downloads page
- Follow this project (click "follow" at the top right of this page)
- Follow @datagrid on Twitter for WPF and Toolkit news
- Like Xceed's WPF page on Facebook
- Check out a video or two on XceedVideos YouTube Channel
- Add bugs or feature requests to the Issue Tracker