brianlagunas_cp
29ac63a65d
PropertyGrid: added FilterWatermark property which allows you to customize the watermark of the Filter textbox.
15 years ago
brianlagunas_cp
fad356b88d
PropertyGrid; fixed null exception when clicking the categorize and alphabetize buttons when the SelectedObject is null.
15 years ago
brianlagunas_cp
50f76f0649
PropertyGrid: added new property called AutoGenerateProperties. When true it will autogenerate all properties for an object. Wehn set to false if till not generate any properties, but instead you supply the property to show be defining PropertyDefinitions. here is an example:
<extToolkit:PropertyGrid AutoGenerateProperties="False">
<extToolkit:PropertyGrid.PropertyDefinitions>
<extToolkit:PropertyDefinition Name="FirstName" />
<extToolkit:PropertyDefinition Name="Age" />
</extToolkit:PropertyGrid.PropertyDefinitions>
</extToolkit:PropertyGrid>
This will only show the FirstName and Age properties of the bound object.
15 years ago
brianlagunas_cp
093c0485c2
PropertyGrid: Implemented support for complex properties. You can now drill down into a hierarchy of an object's properties. I an not sure if I will create my own attribute or use the following syntax.
[TypeConverter(typeof(ExpandableObjectConverter))]
public Person Admin
{
get { return _admin; }
set { _admin = value; }
}
For now it works with the above syntax.
15 years ago
brianlagunas_cp
f39523515d
PropertyGrid: Deleted custom TypeEditorAttribute for defining editors and instead use the already common EditorAttribute provided my the .NET framework. Editors MUST implement the ITypeEditor interface. So now to declare custom editors you define them as follows:
private TimeSpan _timeSpan;
[Editor(typeof(MyCustomEditor), typeof(MyCustomEditor))]
public TimeSpan TimeSpan
{
get { return _timeSpan; }
set { _timeSpan = value; }
}
public class MyCustomEditor : ITypeEditor
{
public FrameworkElement ResolveEditor(PropertyItem propertyItem)
{
TextBox editor = new TextBox();
Binding binding = new Binding("Value"); //bind to the Value property of the PropertyItem instance
binding.Source = propertyItem;
binding.Mode = propertyItem.IsWriteable ? BindingMode.TwoWay : BindingMode.OneWay;
BindingOperations.SetBinding(editor, TextBox.TextProperty, binding);
return editor;
}
}
15 years ago
brianlagunas_cp
00ca8aaa08
PropertyGrid: fixed the alphabetical sorting. Got to watch those "magic strings" when renaming.
15 years ago
brianlagunas_cp
96a65ec051
PropertyGrid: added ability to define editors with a simple attribute called TypeEditorAttirbute. You can use a default editor or create a custom editor as follows:
public class MyCustomEditor : ITypeEditor
{
public FrameworkElement ResolveEditor(PropertyItem propertyItem)
{
TextBox editor = new TextBox();
Binding binding = new Binding("Value"); //bind to the Value property of the PropertyItem instance
binding.Source = propertyItem;
binding.Mode = propertyItem.IsWriteable ? BindingMode.TwoWay : BindingMode.OneWay;
BindingOperations.SetBinding(editor, TextBox.TextProperty, binding);
return editor;
}
}
Then attribute the property to use the editor on:
private TimeSpan _timeSpan;
[TypeEditor(typeof(MyCustomEditor))]
public TimeSpan TimeSpan
{
get { return _timeSpan; }
set { _timeSpan = value; }
}
15 years ago
brianlagunas_cp
b3152155b1
PropertyGrid: Added new attribute called ItemsSourceAttribute which allows you to use an attribute to specify a custom items source for a ComboBox editor. To use simply create a custom class the implements the IItemsSource interface:
public class ColorSource : IItemsSource
{
public IList<object> GetValues()
{
return new List<object>() { Colors.Blue, Colors.Gray, Colors.Green };
}
}
Then decorate your property with the ItemsSource attirbute and specify the Type of source to use:
private Color _color = Colors.Green;
[ItemsSource(typeof(ColorSource))]
public Color Color
{
get { return _color; }
set { _color = value; }
}
When the PropertyGrid loads, the editor for the Color property will be a ComboBox with an ItemsSource of ColorSource.GetValues().
15 years ago
brianlagunas_cp
e34f51e8b1
PropertyGrid: fixed bug when the SelectedObject is set to null the information panel retains the last selected property info.
15 years ago
brianlagunas_cp
3fbc48411a
PropertyGrid: added TimeSpan editor
15 years ago
brianlagunas_cp
2523b237d2
PropertyGrid BREAKING CHANGES - renamed CustomTypeEditors to EditorDefinitions. Added ability to add custom editors by declaring a DataTemplate. You can target a Type or a list of PropertyNames.
Example:
<extToolkit:PropertyGrid>
<extToolkit:PropertyGrid.EditorDefinitions>
<extToolkit:EditorDefinition TargetType="{x:Type sys:DateTime}">
<extToolkit:EditorDefinition.EditorTemplate>
<DataTemplate>
<extToolkit:DateTimeUpDown Format="ShortDate" Value="{Binding Value}" />
</DataTemplate>
</extToolkit:EditorDefinition.EditorTemplate>
</extToolkit:EditorDefinition>
</extToolkit:PropertyGrid.EditorDefinitions>
</extToolkit:PropertyGrid>
15 years ago
brianlagunas_cp
1f6dd01716
PropertyGrid: implemented CustomTypeEditors and also did some refactoring.
15 years ago
brianlagunas_cp
59246fd23c
PropertyGrid: added new AdvanceOptionsMenu property that allows you to specify a custom ContentMenu for the AdvanceOptions button on a property item.
15 years ago
brianlagunas_cp
e6d88f30da
PropertyGrid: added ShowAdvancedOptions property.
15 years ago
brianlagunas_cp
cfcb570f14
New PrimitiveTypeCollectionEditor added. It is used for editing IList<PrimitiveType> such as Int and String. PropertyGrid now uses this editor for editing primitive colleciton types.
15 years ago
brianlagunas_cp
8aaac023af
PropertyGrid: finished CollectionEditor control. This editor will only work for collections that implement the IList interface.
15 years ago
brianlagunas_cp
7e8fd94c47
PropertyGrid: added Update() method which will allow you to update all property values in the PropertyGrid with the data from the SelectedObject. This is helpful when your SelectedObject does not implement the INotifyPropertyChanged interface.
15 years ago
brianlagunas_cp
dac6d6469e
PropertyGrid: working on collection editor
15 years ago
brianlagunas_cp
8030f0a09e
PropertyGrid: removing properties that are not Browsable
15 years ago
brianlagunas_cp
2043db6035
PropertyGrid: added color editor.
15 years ago
brianlagunas_cp
cea282dcfd
PropertyGrid: added support for the DisplayNameAttribute
15 years ago
brianlagunas_cp
3dbf1e4d9f
PropertyGrid: added filtering
15 years ago
brianlagunas_cp
6a03a7bf8e
PropertyGrid: improved how I populated the property descriptors and starting to work on filtering
15 years ago
brianlagunas_cp
8448087086
Getting ready for v1.4 release
15 years ago
brianlagunas_cp
8e5c79604a
refactored new numeric editors and added the editors to the PropertyGrid control. Now time to start ripping out the old NumericUpDown control.
15 years ago
brianlagunas_cp
6f5d844125
checked in initial IntegerUpDown control. Not ready for use, just getting it in the code base.
15 years ago
brianlagunas_cp
faa7825423
Major overhaul of NumericUpDown, DateTimeUpDown, and MaskedTextBox in order to support null values. Need extensive testing because I am sure I broke something.
15 years ago
brianlagunas_cp
26e89f796b
PropertyGrid: minor fixes, implemented TextBlockEditor for readonly properties.
15 years ago
brianlagunas_cp
11e66be6d9
PropertyGrid: Fixed column resizing when switching from Categorized to Alphabetized
15 years ago
brianlagunas_cp
608eedf9c5
PropertyGrid: added DisplaySummary property to allow you to show/hide the Suammry area
15 years ago
brianlagunas_cp
228975f121
PropertyGrid: implemented DateTimeUpDown type editor. Working on property binding options menu.
15 years ago
brianlagunas_cp
ce31bb0c7a
PropertyGrid: added NumericUpDown type editor for double and int.
15 years ago
brianlagunas_cp
d34bf44016
PropertyGrid: custom type editors can now target specific properties or a particular type.
15 years ago
brianlagunas_cp
c1138ce229
PropertyGrid: Re-architected editors. This alllows you to create and provide custom editors.
15 years ago
brianlagunas_cp
6017e79d6b
PropertyGrid: fixed UIElement object's name binding.
15 years ago
brianlagunas_cp
68a8143c63
PropertyGrid: implemented SelectedProperty.
15 years ago
brianlagunas_cp
94a8e34b60
initial checkin of PropertyGrid. Filter not implemented. Some editors aren't implemented. Icons missing for Category and Alphabetical lists of properties.
15 years ago