RadPropertyGrid
Provides infrastructure for command execution for RadPropertyGrid.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.Data.dll
Syntax:
[TelerikToolboxCategory("Data")]
public class RadPropertyGrid : Control
Inheritance: objectRadPropertyGrid
Constructors
Initializes a new instance of the RadPropertyGrid class.
public RadPropertyGrid()
Fields
AutoExpandGroupsProperty
DependencyProperty
Represents the AutoExpandGroups dependency property.
public static readonly DependencyProperty AutoExpandGroupsProperty
AutoGenerateBindingPathsProperty
DependencyProperty
Represents the AutoGenerateBindingPaths dependency property.
public static readonly DependencyProperty AutoGenerateBindingPathsProperty
AutoGeneratePropertyDefinitionsModeProperty
DependencyProperty
Represents the AutoGeneratePropertyDefinitionsMode dependency property.
public static readonly DependencyProperty AutoGeneratePropertyDefinitionsModeProperty
AutoGeneratePropertyDefinitionsProperty
DependencyProperty
Represents the AutoGeneratePropertyDefinitions dependency property.
public static readonly DependencyProperty AutoGeneratePropertyDefinitionsProperty
BeginningEditEvent
RoutedEvent
Represents the BeginningEdit routed event.
public static readonly RoutedEvent BeginningEditEvent
CanUserResizeDescriptionPanelProperty
DependencyProperty
Represents the CanUserResizeDescriptionPanel dependency property.
public static readonly DependencyProperty CanUserResizeDescriptionPanelProperty
CanUserSelectProperty
DependencyProperty
Identifies the CanUserSelect dependency property.
public static readonly DependencyProperty CanUserSelectProperty
CommandProviderProperty
DependencyProperty
Represents the CommandProvider dependency property.
public static readonly DependencyProperty CommandProviderProperty
DescriptionPanelVisibilityProperty
DependencyProperty
Represents the DescriptionPanelVisibility dependency property.
public static readonly DependencyProperty DescriptionPanelVisibilityProperty
EditEndedEvent
RoutedEvent
Represents the EditEnded routed event.
public static readonly RoutedEvent EditEndedEvent
EditModeProperty
DependencyProperty
Represents the EditMode DependencyProperty.
public static readonly DependencyProperty EditModeProperty
EditorTemplateSelectorProperty
DependencyProperty
Represents the EditorTemplateSelector dependency property.
public static readonly DependencyProperty EditorTemplateSelectorProperty
EnableCustomFilteringProperty
DependencyProperty
Represents the EnableCustomFiltering dependency property.
public static readonly DependencyProperty EnableCustomFilteringProperty
EnableDeferredFilteringProperty
DependencyProperty
Represents the EnableDeferredFiltering dependency property.
public static readonly DependencyProperty EnableDeferredFilteringProperty
EnableEditorCachingProperty
DependencyProperty
Represents the EnableEditorCaching dependency property.
public static readonly DependencyProperty EnableEditorCachingProperty
FieldIndicatorVisibilityProperty
DependencyProperty
represents the FieldIndicatorVisibility dependency property.
public static readonly DependencyProperty FieldIndicatorVisibilityProperty
FieldStyleProperty
DependencyProperty
Represents the FieldStyle dependency property.
public static readonly DependencyProperty FieldStyleProperty
GroupedEvent
RoutedEvent
Occurs after grouping was performed.
public static readonly RoutedEvent GroupedEvent
GroupStyleProperty
DependencyProperty
Represents the GroupStyle dependency property.
public static readonly DependencyProperty GroupStyleProperty
GroupStyleSelectorProperty
DependencyProperty
Identifies the GroupStyleSelector dependency property.
public static readonly DependencyProperty GroupStyleSelectorProperty
IsGroupedProperty
DependencyProperty
Represents the IsGrouped dependency property.
public static readonly DependencyProperty IsGroupedProperty
IsReadOnlyProperty
DependencyProperty
Represents the IsReadOnly property.
public static readonly DependencyProperty IsReadOnlyProperty
IsTextSearchCaseSensitiveProperty
DependencyProperty
Represents the IsTextSearchEnabled dependency property.
public static readonly DependencyProperty IsTextSearchCaseSensitiveProperty
IsTextSearchEnabledProperty
DependencyProperty
Represents the IsTextSearchEnabled dependency property.
public static readonly DependencyProperty IsTextSearchEnabledProperty
IsVirtualizingProperty
DependencyProperty
Represents the IsVirtualizing property.
public static readonly DependencyProperty IsVirtualizingProperty
ItemProperty
DependencyProperty
Represents the Item dependency property.
public static readonly DependencyProperty ItemProperty
LabelColumnWidthProperty
DependencyProperty
Represents the LabelColumnWidth dependency property.
public static readonly DependencyProperty LabelColumnWidthProperty
NestedPropertiesVisibilityProperty
DependencyProperty
Represents the ModeProperty dependency property.
public static readonly DependencyProperty NestedPropertiesVisibilityProperty
PreparedEditorEvent
RoutedEvent
Represents the PreparedEditor routed event.
public static readonly RoutedEvent PreparedEditorEvent
This event is fired only when the value of the EditMode property is Single.
PropertySetModeProperty
DependencyProperty
Represents the PropertySetMode property.
public static readonly DependencyProperty PropertySetModeProperty
PropertySetsValidationFunctionProperty
DependencyProperty
Represents the PropertySetsValidationFunction dependency property.
public static readonly DependencyProperty PropertySetsValidationFunctionProperty
PropertySetViewModelProperty
DependencyProperty
Represents the PropertySetViewModelProperty property.
public static readonly DependencyProperty PropertySetViewModelProperty
ReadOnlyEditorStateProperty
DependencyProperty
Represents the ReadOnlyEditorState dependency property.
public static readonly DependencyProperty ReadOnlyEditorStateProperty
RenderModeProperty
DependencyProperty
Represents the RenderMode dependency property.
public static readonly DependencyProperty RenderModeProperty
SearchBoxVisibilityProperty
DependencyProperty
Represents the SearchBoxVisibility dependency property.
public static readonly DependencyProperty SearchBoxVisibilityProperty
SearchInNestedPropertiesProperty
DependencyProperty
Represents the SearchInNestedProperties dependency property.
public static readonly DependencyProperty SearchInNestedPropertiesProperty
SelectedPropertyDefinitionProperty
DependencyProperty
Represents the SelectedPropertyDefinition dependency property.
public static readonly DependencyProperty SelectedPropertyDefinitionProperty
SelectionChangedEvent
RoutedEvent
Identifies the SelectionChanged routed event.
public static readonly RoutedEvent SelectionChangedEvent
SelectionModeProperty
DependencyProperty
Identifies the SelectionMode dependency property.
public static readonly DependencyProperty SelectionModeProperty
SortAndGroupButtonsVisibilityProperty
DependencyProperty
Represents the SortAndGroupButtonsVisibility dependency property.
public static readonly DependencyProperty SortAndGroupButtonsVisibilityProperty
SortedEvent
RoutedEvent
Occurs after sorting was performed.
public static readonly RoutedEvent SortedEvent
TextSearchModeProperty
DependencyProperty
Represents the TextSearchMode dependency property.
public static readonly DependencyProperty TextSearchModeProperty
ValidatedEvent
RoutedEvent
Represents the Validated routed event.
public static readonly RoutedEvent ValidatedEvent
ValidatingEvent
RoutedEvent
Represents the Validating routed event.
public static readonly RoutedEvent ValidatingEvent
Properties
Gets or sets a value indicating whether groups should be automatically expanded.
public bool AutoExpandGroups { get; set; }
Gets or sets a value indicating whether manually defined nested PropertyDefinitions, should have auto-generated paths.
public bool AutoGenerateBindingPaths { get; set; }
true if [auto generate binding paths]; otherwise, false.
Gets or sets a value indicating whether property definitions will be auto-generated.
public bool AutoGeneratePropertyDefinitions { get; set; }
Gets or sets a value indicating whether property definitions will be auto-generated for nested properties.
public AutoGeneratePropertyDefinitionsMode AutoGeneratePropertyDefinitionsMode { get; set; }
Gets or sets a value that indicates whether the user can adjust description panel width using the mouse.
public bool CanUserResizeDescriptionPanel { get; set; }
Gets or sets a value indicating whether the user can select property definition.
public bool CanUserSelect { get; set; }
true if user can select; otherwise, false.
Gets or sets the command provider associated with this RadPropertyGrid instance.
public ICommandProvider CommandProvider { get; set; }
The command provider.
DescriptionPanelVisibility
Visibility
Gets or sets the description panel visibility.
public Visibility DescriptionPanelVisibility { get; set; }
Gets or sets the EditMode of RadPropertyGrid.
public PropertyGridEditMode EditMode { get; set; }
EditorTemplateSelector
DataTemplateSelector
Gets or sets the editor template selector.
public DataTemplateSelector EditorTemplateSelector { get; set; }
The editor template selector.
Gets or sets a value indicating whether RadPropertyGrid enables custom filtering.
public bool EnableCustomFiltering { get; set; }
true if [enable custom filtering]; otherwise, false.
Gets or sets a value indicating whether RadPropertyGrid enables deferred filtering.
public bool EnableDeferredFiltering { get; set; }
true if [enable deferred filtering]; otherwise, false.
Gets or sets a value indicating whether RadPropertyGrid uses editor caching.
public bool EnableEditorCaching { get; set; }
true if [enable editor caching]; otherwise, false.
FieldIndicatorVisibility
Visibility
Gets or sets the field indicator visibility.
public Visibility FieldIndicatorVisibility { get; set; }
The field indicator visibility.
FieldStyle
Style
Gets or sets a Style for all PropertyGridFields in the scope of a RadPropertyGrid instance.
public Style FieldStyle { get; set; }
The field style.
Gets a collection of GroupDefinition objects used to group the property grid.
public GroupDefinitionsCollection GroupDefinitions { get; }
The group definition.
GroupDefinitions collection will be filled only when RenderMode="Flat".
GroupStyle
Style
Gets or sets the style for GroupDefinition button.
public Style GroupStyle { get; set; }
The GroupStyle.
GroupStyleSelector
StyleSelector
Gets or sets the style selector for RadPropertyGrid group.
public StyleSelector GroupStyleSelector { get; set; }
Gets or sets a value indicating whether this instance is grouped.
public bool IsGrouped { get; set; }
Gets or sets a value indicating whether this instance is read only.
public bool IsReadOnly { get; set; }
true if this instance is read only; otherwise, false.
Gets or sets a value that indicates whether case is a condition when searching.
public bool IsTextSearchCaseSensitive { get; set; }
Gets or sets a value that determines whether the user can navigate to an item by typing when RadPropertyGrid is focused.
public bool IsTextSearchEnabled { get; set; }
Gets or sets a value indicating whether this PropertyGrid is virtualized.
public bool IsVirtualizing { get; set; }
true if this instance is virtualized; otherwise, false.
LabelColumnWidth
GridLength
Gets or Sets the width of the first column.
public GridLength LabelColumnWidth { get; set; }
NestedPropertiesVisibility
Visibility
Gets or sets the nested properties' Visibility.
public Visibility NestedPropertiesVisibility { get; set; }
Gets a collection of PropertyDefinitions describing the properties displayed or edited by RadPropertyGrid.
public PropertyDefinitionCollection PropertyDefinitions { get; }
The collection of PropertyDefinitions.
Gets the property set.
public PropertySet PropertySet { get; }
The property set.
Gets or sets the property set mode.
public PropertySetOperation PropertySetMode { get; set; }
The property set mode.
Gets or sets a function that is used to validate PropertySet properties.
public Func<string, object, string> PropertySetsValidationFunction { get; set; }
Gets or sets the state of editors when RadPropertyGrid is ReadOnly.
public ReadOnlyEditorStates ReadOnlyEditorState { get; set; }
The state of the read only editor.
Gets or sets the render mode.
public RenderMode RenderMode { get; set; }
The rendering mode.
SearchBoxVisibility
Visibility
Gets or sets the search box visibility.
public Visibility SearchBoxVisibility { get; set; }
The search box visibility.
Gets or sets a value indicating whether search should be execute over nested properties.
public bool SearchInNestedProperties { get; set; }
true if search in nested properties is enabled; otherwise, false.
Gets the selected property definition.
public PropertyDefinition SelectedPropertyDefinition { get; set; }
Gets a collection that contains the selected property definitions.
public ObservableCollection<PropertyDefinition> SelectedPropertyDefinitions { get; }
A collection of the data items corresponding to the selected fields.
If the SelectionMode property is set to Single, the SelectedPropertyDefinitions list will contain only the SelectedPropertyDefinition property value.
SelectionMode
SelectionMode
Gets or sets the SelectionMode. This is a dependency property.
public SelectionMode SelectionMode { get; set; }
SortAndGroupButtonsVisibility
Visibility
Gets or sets the visibility of the sort and group buttons.
public Visibility SortAndGroupButtonsVisibility { get; set; }
Gets or sets the text search mode. Specifies how TextSearch will match items. This is a dependency property.
public TextSearchMode TextSearchMode { get; set; }
The text search mode.
Methods
Begins a new edit operation.
public void BeginEdit()
Begins a new edit operation.
public void BeginEdit(PropertyDefinition propertyDefinition)
Cancels the changes from the current edit operation.
public void CancelEdit()
Collapses all groups recursively.
public void CollapseAllGroups()
The method will work only when RenderMode="Flat".
Collapses the visual group for the given GroupDefinition.
public void CollapseGroup(object groupKey)
The key for the group to collapse.
The method will work only when RenderMode="Flat".
Commits the changes from the current edit operation.
public void CommitEdit()
Commits the changes from the current edit operation.
public void CommitEdit(PropertyDefinition propertyDefinition)
Indicates that the initialization process for the element is complete.
public override void EndInit()
Expands all groups recursively.
public void ExpandAllGroups()
The method will work only when RenderMode="Flat".
Set expand state for the given GroupDefinition.
public void ExpandGroup(object groupKey)
The key for the group to expand.
The method will work only when RenderMode="Flat".
Groups this RadPropertyGrid instance.
public void Group()
When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call . In simplest terms, this means the method is called just before a UI element displays in an application. For more information, see Remarks.
public override void OnApplyTemplate()
Raises the BeginningEdit event.
protected virtual void OnBeginningEdit(PropertyGridBeginningEditEventArgs args)
OnCreateAutomationPeer()
AutomationPeer
Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.
protected override AutomationPeer OnCreateAutomationPeer()
AutomationPeer
The type-specific AutomationPeer implementation.
Raises the EditEnded event.
protected virtual void OnEditEnded(PropertyGridEditEndedEventArgs args)
Raises the FieldLoaded event.
Raises the event. This method is invoked whenever is set to true internally.
protected override void OnInitialized(EventArgs e)
The RoutedEventArgs that contains the event data.
Called when IsReadOnly property is changed.
protected static void OnIsReadOnlyPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
The sender.
argsDependencyPropertyChangedEventArgsThe DependencyPropertyChangedEventArgs instance containing the event data.
Called when IsVirtualizing property gets changed.
protected static void OnIsVirtualizingPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs args)
The d.
argsDependencyPropertyChangedEventArgsThe DependencyPropertyChangedEventArgs instance containing the event data.
Raises the ItemChanged event.
protected virtual void OnItemChanged(PropertyGridItemChangedEventArgs args)
Called when the MouseLeftButton down event occurs.
protected void OnMouseLeftButtonDown(object sender, RoutedEventArgs e)
The sender.
eRoutedEventArgsThe MouseButtonEventArgs instance containing the event data.
Raises the PreparedEditor event.
protected virtual void OnPreparedEditor(PropertyGridPreparedEditorEventArgs args)
Called when PropertyDefinitionCollection's CollectionChanged event is raised.
protected virtual void OnPropertyDefinitionsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
The sender.
eNotifyCollectionChangedEventArgsThe NotifyCollectionChangedEventArgs instance containing the event data.
Raises the PropertySetValueChanged event.
protected virtual void OnPropertySetValueChanged(string propertyName, IEnumerable items, object value)
protected override void OnTextInput(TextCompositionEventArgs e)
Raises the Validating event.
protected virtual void OnValidated(PropertyGridValidatedEventArgs args)
Raises the Validating event.
protected virtual void OnValidating(PropertyGridValidatingEventArgs args)
Rebinds the property grid.
public void Rebind()
Registers the command bindings associated with RadPropertyGrid.
public void RegisterCommandBindings()
Reloads the set of PropertyDefinitions, the list of item properties and recreates the PropertySetView model, if PropertySetMode is different from None.
public void ReloadData()
Resets the theme.
public void ResetTheme()
Scrolls a given PropertyDefinition into view in virtualized scenarios.
public void ScrollIntoViewAsync(PropertyDefinition propertyDefinition, Action<PropertyGridField> finishedCallback)
The property definition.
finishedCallbackAction<PropertyGridField>The finished callback.
Searches for PropertyDefinitions which DisplayName contains the given search parameter.
Sorts this RadPropertyGrid instance.
public void Sort()
Updates the layout state of the PropertyGridPresenter.
protected void UpdateLayoutState()
public void UpdatePropertySetValue(string propertyName, object propertyValue, bool shouldUpdateBoundData)
The name of the updated property.
propertyValueobjectThe value of the updated property.
shouldUpdateBoundDataboolIndicates whether the bound data (Item) should be updated.
Events
Occurs when a property definition is being generated.
public event EventHandler<AutoGeneratingPropertyDefinitionEventArgs> AutoGeneratingPropertyDefinition
Occurs when a new edit operation is initiated.
public event EventHandler<PropertyGridBeginningEditEventArgs> BeginningEdit
This event is fired only when the value of the EditMode property is Single.
Occurs when edit operation is finished.
public event EventHandler<PropertyGridEditEndedEventArgs> EditEnded
This event is fired only when the value of the EditMode property is Single.
Occurs when a new field is loaded.
public event EventHandler<FieldEventArgs> FieldLoaded
Occurs after filtering is applied to RadPropertyGrid.
public event EventHandler<EventArgs> Filtered
Occurs when filtering RadPropertyGrid.
public event EventHandler<PropertyGridFilteringEventArgs> Filtering
Occurs after grouping was performed.
public event EventHandler<RadRoutedEventArgs> Grouped
Occurs when RadPropertyGrid's item gets changed.
public event EventHandler<PropertyGridItemChangedEventArgs> ItemChanged
Occurs when the field editor gets prepared .
public event PropertyGridPreparedEditorEventHandler PreparedEditor
Occurs when the value of a property from the PropertySet is changed.
public event EventHandler<PropertySetValueChangedEventArgs> PropertySetValueChanged
Occurs when the selected property definition has changed.
public event EventHandler<SelectionChangeEventArgs> SelectionChanged
Occurs after sorting was performed.
public event EventHandler<RadRoutedEventArgs> Sorted
Occurs after validation of edit changes takes place.
public event EventHandler<PropertyGridValidatedEventArgs> Validated
Occurs before validation of edit changes takes place.
public event EventHandler<PropertyGridValidatingEventArgs> Validating