menu

WPF

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PropertyGrid - WPF API Reference | Syncfusion

    Show / Hide Table of Contents

    Class PropertyGrid

    Inheritance
    System.Object
    PropertyGrid
    Implements
    System.IDisposable
    Namespace: Syncfusion.Windows.PropertyGrid
    Assembly: Syncfusion.PropertyGrid.Wpf.dll
    Syntax
    [SkinType(SkinVisualStyle = Skin.Office2007Blue, Type = typeof(PropertyGrid), XamlResource = "/Syncfusion.PropertyGrid.WPF;component/Themes/Office2007BlueStyle.xaml")]
    [SkinType(SkinVisualStyle = Skin.Office2007Black, Type = typeof(PropertyGrid), XamlResource = "/Syncfusion.PropertyGrid.WPF;component/Themes/Office2007BlackStyle.xaml")]
    [SkinType(SkinVisualStyle = Skin.Office2007Silver, Type = typeof(PropertyGrid), XamlResource = "/Syncfusion.PropertyGrid.WPF;component/Themes/Office2007SilverStyle.xaml")]
    [SkinType(SkinVisualStyle = Skin.Office2010Blue, Type = typeof(PropertyGrid), XamlResource = "/Syncfusion.PropertyGrid.WPF;component/Themes/Office2010BlueStyle.xaml")]
    [SkinType(SkinVisualStyle = Skin.Office2010Black, Type = typeof(PropertyGrid), XamlResource = "/Syncfusion.PropertyGrid.WPF;component/Themes/Office2010BlackStyle.xaml")]
    [SkinType(SkinVisualStyle = Skin.Office2010Silver, Type = typeof(PropertyGrid), XamlResource = "/Syncfusion.PropertyGrid.WPF;component/Themes/Office2010SilverStyle.xaml")]
    [SkinType(SkinVisualStyle = Skin.Office2003, Type = typeof(PropertyGrid), XamlResource = "/Syncfusion.PropertyGrid.WPF;component/Themes/Office2003Style.xaml")]
    [SkinType(SkinVisualStyle = Skin.Blend, Type = typeof(PropertyGrid), XamlResource = "/Syncfusion.PropertyGrid.WPF;component/Themes/BlendStyle.xaml")]
    [SkinType(SkinVisualStyle = Skin.SyncOrange, Type = typeof(PropertyGrid), XamlResource = "/Syncfusion.PropertyGrid.WPF;component/Themes/SyncOrangeStyle.xaml")]
    [SkinType(SkinVisualStyle = Skin.ShinyRed, Type = typeof(PropertyGrid), XamlResource = "/Syncfusion.PropertyGrid.WPF;component/Themes/ShinyRedStyle.xaml")]
    [SkinType(SkinVisualStyle = Skin.ShinyBlue, Type = typeof(PropertyGrid), XamlResource = "/Syncfusion.PropertyGrid.WPF;component/Themes/ShinyBlueStyle.xaml")]
    [SkinType(SkinVisualStyle = Skin.VS2010, Type = typeof(PropertyGrid), XamlResource = "/Syncfusion.PropertyGrid.WPF;component/Themes/VS2010Style.xaml")]
    [SkinType(SkinVisualStyle = Skin.Default, Type = typeof(PropertyGrid), XamlResource = "/Syncfusion.PropertyGrid.WPF;component/Themes/Generic.xaml")]
    [SkinType(SkinVisualStyle = Skin.Metro, Type = typeof(PropertyGrid), XamlResource = "/Syncfusion.PropertyGrid.WPF;component/Themes/MetroStyle.xaml")]
    [SkinType(SkinVisualStyle = Skin.Transparent, Type = typeof(PropertyGrid), XamlResource = "/Syncfusion.PropertyGrid.WPF;component/Themes/TransparentStyle.xaml")]
    [SkinType(SkinVisualStyle = Skin.Office2013, Type = typeof(PropertyGrid), XamlResource = "/Syncfusion.PropertyGrid.WPF;component/Themes/Office2013Style.xaml")]
    public class PropertyGrid : Control, IDisposable

    Constructors

    PropertyGrid()

    Initializes a new instance of the PropertyGrid class.

    Declaration
    public PropertyGrid()

    Fields

    AutoGenerateItemsProperty

    Using a DependencyProperty as the backing store for AutoGenerateItems. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty AutoGenerateItemsProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    ButtonPanelVisibilityProperty

    Using a DependencyProperty as the backing store for ButtonPanelVisibility. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty ButtonPanelVisibilityProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    CategoryEditorsProperty

    Using a DependencyProperty as the backing store for CategoryEditors. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty CategoryEditorsProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    CategoryForegroundProperty

    Declaration
    public static readonly DependencyProperty CategoryForegroundProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    CollapseSidePanelProperty

    CollapseSidePanel an dependency property for the collapsing the side panel of the PropertyGrid

    Declaration
    public static readonly DependencyProperty CollapseSidePanelProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    CustomEditorCollectionProperty

    Declaration
    public static readonly DependencyProperty CustomEditorCollectionProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    DefaultPropertyPathProperty

    Using a DependencyProperty as the backing store for DefaultPropertyPath. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty DefaultPropertyPathProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    DescriptionPanelHeightProperty

    Using a DependencyProperty as the backing store for DescriptionPanelHeight. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty DescriptionPanelHeightProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    DescriptionPanelVisibilityProperty

    Using a DependencyProperty as the backing store for DescriptionPanelVisibility. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty DescriptionPanelVisibilityProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    DescriptionTemplateProperty

    Using a DependencyProperty as the backing store for DescriptionTemplate. This enables animation, styling, binding, etc.

    Declaration
    public static readonly DependencyProperty DescriptionTemplateProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    DescriptionTemplateSelectorProperty

    Using a DependencyProperty as the backing store for DescriptionTemplateSelector. This enables animation, styling, binding, etc.

    Declaration
    public static readonly DependencyProperty DescriptionTemplateSelectorProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    DisableAnimationOnObjectSelectionProperty

    enable or disable animation while loading selectedobject

    Declaration
    public static readonly DependencyProperty DisableAnimationOnObjectSelectionProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    EditableBackgroundProperty

    Using a DependencyProperty as the backing store for EditableBackground. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty EditableBackgroundProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    EditableFontWeightProperty

    Using a DependencyProperty as the backing store for EditableFontWeight. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty EditableFontWeightProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    EnableGroupingProperty

    Declaration
    public static readonly DependencyProperty EnableGroupingProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    EnableToolTipProperty

    Using a DependencyProperty as the backing store for EnableToolTip. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty EnableToolTipProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    FlatTypeCollection

    Represents the FlatTypeCollection

    Declaration
    public ObservableCollection<Type> FlatTypeCollection
    Field Value
    Type
    System.Collections.ObjectModel.ObservableCollection<System.Type>

    HidePropertiesCollectionProperty

    Declaration
    public static readonly DependencyProperty HidePropertiesCollectionProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    IsVirtualizingProperty

    Using a DependencyProperty as the backing store for IsVirtualizing. This enables animation, styling, binding, etc.

    Declaration
    public static readonly DependencyProperty IsVirtualizingProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    ItemsProperty

    Using a DependencyProperty as the backing store for Items. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty ItemsProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    LineColorProperty

    Declaration
    public static readonly DependencyProperty LineColorProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    LoadingDelayProperty

    Using a DependencyProperty as the backing store for LoadingDelay. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty LoadingDelayProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    MenuButtonVisibilityProperty

    Using a DependencyProperty as the backing store for MyProperty. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty MenuButtonVisibilityProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    MenuItemsProperty

    Using a DependencyProperty as the backing store for MyProperty. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty MenuItemsProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    PART_GroupButton

    The ToggleButton variable Part_GroupButton for defining the group buttons

    Declaration
    public ToggleButton PART_GroupButton
    Field Value
    Type
    System.Windows.Controls.Primitives.ToggleButton

    PART_SortButton

    The ToggleButton variable Part_GroupButton for defining the group buttons

    Declaration
    public ToggleButton PART_SortButton
    Field Value
    Type
    System.Windows.Controls.Primitives.ToggleButton

    PropertiesProperty

    Declaration
    public static readonly DependencyProperty PropertiesProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    PropertyExpandModeProperty

    Using a DependencyProperty as the backing store for PropertyVisiblityMode. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty PropertyExpandModeProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    PropertyNameColumnDefinitionProperty

    Using a DependencyProperty as the backing store for ColumnWidth.

    Declaration
    public static readonly DependencyProperty PropertyNameColumnDefinitionProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    ReadOnlyBackgroundProperty

    Using a DependencyProperty as the backing store for ReadOnlyBackground. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty ReadOnlyBackgroundProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    ReadOnlyFontWeightProperty

    Using a DependencyProperty as the backing store for ReadOnlyFontWeight. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty ReadOnlyFontWeightProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    SearchBoxVisibilityProperty

    Using a DependencyProperty as the backing store for SearchBoxVisibility. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty SearchBoxVisibilityProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    SelectedItemsProperty

    Using a DependencyProperty as the backing store for SelectedItems. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty SelectedItemsProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    SelectedObjectProperty

    SelectedObject property used for displaying object which displays in the grid.

    Declaration
    public static readonly DependencyProperty SelectedObjectProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    SelectedPropertyItemProperty

    Using a DependencyProperty as the backing store for MyProperty. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty SelectedPropertyItemProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    SortDirectionProperty

    Declaration
    public static readonly DependencyProperty SortDirectionProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    UpdateSourceModeProperty

    Using a DependencyProperty as the backing store for UpdateSourceMode. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty UpdateSourceModeProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    ViewBackgroundColorProperty

    Declaration
    public static readonly DependencyProperty ViewBackgroundColorProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    VisualStyleProperty

    Using a DependencyProperty as the backing store for VisualStyle. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty VisualStyleProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    Properties

    AutoGenerateItems

    Gets or sets a value that indicates whether the PropertyItem automatically generate or not in PropertyGrid based on selected object.

    Declaration
    public bool AutoGenerateItems { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value is true.

    Remarks

    True, if the PropertyGrid property can be generated automatically based on selected object. False, if the PropertyGrid PropertyItem can generated based on Items.

    ButtonPanelVisibility

    Gets or sets the button panel visibility.

    Declaration
    public Visibility ButtonPanelVisibility { get; set; }
    Property Value
    Type Description
    System.Windows.Visibility

    The button panel visibility.

    CategoryEditors

    Gets or sets the category editors.

    Declaration
    public CategoryEditorCollection CategoryEditors { get; set; }
    Property Value
    Type Description
    CategoryEditorCollection

    The category editors.

    CategoryForeground

    Gets or sets the text color used for category headings.

    Declaration
    public Brush CategoryForeground { get; set; }
    Property Value
    Type Description
    System.Windows.Media.Brush

    The category foreground.

    CustomEditorCollection

    Gets or sets the custom editor collection.

    Declaration
    public CustomEditorCollection CustomEditorCollection { get; set; }
    Property Value
    Type Description
    CustomEditorCollection

    The custom editor collection.

    DefaultPropertyPath

    Get and Set the default property path for the property grid

    Declaration
    public string DefaultPropertyPath { get; set; }
    Property Value
    Type
    System.String

    DescriptionPanelHeight

    Gets or set the height of description panel, or the GridLength value.

    Declaration
    public GridLength DescriptionPanelHeight { get; set; }
    Property Value
    Type Description
    System.Windows.GridLength

    The GridLength that represents the height of the description panel. The default value is a GridLength representing a "auto" sizing.

    Remarks

    The DescriptionPanelHeight represents the height of the description panel which shows the description for selected property. If DescriptionPanelHeight uses Auto sizing, then the description panel occupies the height needs to show the description text. If DescriptionPanelHeight uses defined height (for example "100"), then description panel occupies the specfied height. If DescriptionPanelHeight uses Star sizing, for example if "0.5*" is the value, then description panel occupies the one third of the property grid height. Since the property items will have "1*" sizing.

    DescriptionPanelVisibility

    Get and Set the DescriptionPanelVisibility for the PropertyGridControl

    Declaration
    public Visibility DescriptionPanelVisibility { get; set; }
    Property Value
    Type
    System.Windows.Visibility

    DescriptionTemplate

    Gets or sets the template used to display the description of SelectedItem.

    Declaration
    public DataTemplate DescriptionTemplate { get; set; }
    Property Value
    Type Description
    System.Windows.DataTemplate

    The template that defines the appearance of the description Panel.

    Remarks

    DataContext of DescriptionTemplate is PropertyItem. PropertyItem has Name, Description and other useful properties, that can be bounded to the DescriptionTemplate. DescriptionTemplate can be defined in Autogenerating event, PropertyGridItem and PropertyGrid. AutoGeneratingPropertyGridItemEventArgs.DescriptionTemplate takes the highest precedence, PropertyGridItem.DescriptionTemplate takes second precedence, and PropertyGrid.DescriptionTemplate takes the last precedence.

    Examples

    The following example shows how to define a Description template for property item in PropertyGrid control.

    <Grid x:Name="grid">
       <Grid.Resources>
          <DataTemplate x:Key="template1">
             <StackPanel>
                <TextBlock Text = "{Binding Name}"
                           FontSize="16" 
                           Foreground="Red" 
                           TextWrapping="Wrap"/>
                <TextBlock Text = "{Binding Description}"
                           FontSize="14" 
                           Foreground="Green" 
                           TextWrapping="Wrap"/>
             </StackPanel>
          </DataTemplate>
       </Grid.Resources>
       <syncfusion:PropertyGrid x:Name="propertyGrid1"
                                DescriptionPanelVisibility="Visible"
                                DescriptionTemplate="{StaticResource template1}">
          <syncfusion:PropertyGrid.SelectedObject>
              <local:Employee></local:Employee>
          </syncfusion:PropertyGrid.SelectedObject>
       </syncfusion:PropertyGrid>
    </Grid>
    public class Employee
    {
       [Description("Name of the employee")]
       public string Name { get; set; }
       [Description("ID of the employee")]
       public string ID { get; set; }
       [Description("Birth date of the employee")]
       public DateTime DOB { get; set; }
       [Description("Age of the employee")]
       public int Age { get; set; }
       public Employee()
       {
          Name = "John";
          ID = "381";
          DOB = new DateTime(1995, 12, 24);
          Age = 26;
       }
    } 

    DescriptionTemplateSelector

    Gets or sets the DataTemplateSelector, which allows the user can choose the custom template that is used to display the description of SelectedItem.

    Declaration
    public DataTemplateSelector DescriptionTemplateSelector { get; set; }
    Property Value
    Type Description
    System.Windows.Controls.DataTemplateSelector

    The Default value is null.

    Remarks

    The DataContext is PropertyItem, you can set the Name and Description values to customize Descriptions.

    DisableAnimationOnObjectSelection

    enable or disable animation while loading selectedobject

    Declaration
    public bool DisableAnimationOnObjectSelection { get; set; }
    Property Value
    Type
    System.Boolean

    EditableBackground

    Gets or sets the editable background.

    Declaration
    public Brush EditableBackground { get; set; }
    Property Value
    Type Description
    System.Windows.Media.Brush

    The editable background.

    EditableFontWeight

    Gets or sets the editable font weight.

    Declaration
    public FontWeight EditableFontWeight { get; set; }
    Property Value
    Type Description
    System.Windows.FontWeight

    The editable font weight.

    EnableGrouping

    Gets or sets a value indicating whether [enable grouping].

    Declaration
    public bool EnableGrouping { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if [enable grouping]; otherwise, false.

    EnableToolTip

    Get and set the EnableToolTip property

    Declaration
    public bool EnableToolTip { get; set; }
    Property Value
    Type
    System.Boolean

    HidePropertiesCollection

    Gets or sets the hide properties collection.

    Declaration
    public ObservableCollection<string> HidePropertiesCollection { get; set; }
    Property Value
    Type Description
    System.Collections.ObjectModel.ObservableCollection<System.String>

    The hide properties collection.

    IsVirtualizing

    Gets or sets a value indicating whether the ProperrtyGrid virtualizing its PropertyItems. If, true animation is not working even DisableAnimationOnObjectSelection value is true . Default value is True.

    <syncfusion:Propertygrid IsVirtualzing=”true”/>
    PropertyGrid propertyGrid = new PropertyGrid();
    propertygrid.IsVirtualizing = true; 

    Declaration
    public bool IsVirtualizing { get; set; }
    Property Value
    Type
    System.Boolean

    Items

    Gets or sets the custom PropertyGridItem collection in PropertyGrid.

    Declaration
    public ObservableCollection<PropertyGridItem> Items { get; set; }
    Property Value
    Type
    System.Collections.ObjectModel.ObservableCollection<PropertyGridItem>
    Remarks

    Populates only the property item which was defined in Items collection of PropertyGrid.

    Examples

    The following example shows how to set the Items collection of PropertyGrid in XAML.

    <Window x:Class="PropertyGridConfigurationDemo.MainWindow" Icon="App.ico"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:local="clr-namespace:PropertyGridConfigurationDemo" 
    WindowStartupLocation="CenterScreen"
    Title="Getting Started"  Height="550" Width="750" 
    xmlns:syncfusion="clr-namespace:Syncfusion.Windows.PropertyGrid;assembly=Syncfusion.PropertyGrid.Wpf">
    <Window.DataContext>
    <local:ViewModel/>
    </Window.DataContext>
     <Grid>
      <syncfusion:PropertyGrid x:Name="pgrid" SelectedObject="{Binding EmployeeDetails}" AutoGenerateItems="false">
        <syncfusion:PropertyGrid.Items>
            <syncfusion:PropertyGridItem PropertyName = "FirstName" DisplayName="Name"/>
            <syncfusion:PropertyGridItem PropertyName = "Age" >
                <syncfusion:PropertyGridItem.Editor>
                   <local:CustomIntegerTextBoxEditor/>
                </syncfusion:PropertyGridItem.Editor>
            </syncfusion:PropertyGridItem>
            <syncfusion:PropertyGridItem PropertyName = "DOB" DisplayName="Birth Date" Description="Birth date of the actual person."/>
            <syncfusion:PropertyGridItem PropertyName = "FavoriteColor" NestedPropertyDisplayMode="None"/>
        </syncfusion:PropertyGrid.Items>
      </syncfusion:PropertyGrid>
     </Grid>
    </Window>

    LineColor

    Gets or sets the color of the borders and category heading background.

    Declaration
    public Brush LineColor { get; set; }
    Property Value
    Type Description
    System.Windows.Media.Brush

    The color of the line.

    LoadingDelay

    LoadingDelay on MilliSeconds

    Declaration
    public int LoadingDelay { get; set; }
    Property Value
    Type
    System.Int32

    MenuButtonVisibility

    Get and set the MenuButtonVisibility

    Declaration
    public bool MenuButtonVisibility { get; set; }
    Property Value
    Type
    System.Boolean

    MenuItems

    Get and set the MenuItems

    Declaration
    public ObservableCollection<MenuItem> MenuItems { get; set; }
    Property Value
    Type
    System.Collections.ObjectModel.ObservableCollection<System.Windows.Controls.MenuItem>

    Properties

    Gets or sets the properties.

    Declaration
    public PropertyCollection Properties { get; }
    Property Value
    Type Description
    PropertyCollection

    The properties.

    PropertyExpandMode

    Get and set the PropertyExpandMode property

    Declaration
    public PropertyExpandModes PropertyExpandMode { get; set; }
    Property Value
    Type
    PropertyExpandModes

    PropertyNameColumnDefinition

    Gets or set the width of property name column, or the GridLength value (supports double value and star sizing only).

    Declaration
    public GridLength PropertyNameColumnDefinition { get; set; }
    Property Value
    Type
    System.Windows.GridLength

    ReadOnlyBackground

    Gets or sets the read only background.

    Declaration
    public Brush ReadOnlyBackground { get; set; }
    Property Value
    Type Description
    System.Windows.Media.Brush

    The read only background.

    ReadOnlyFontWeight

    Gets or sets the read only font weight.

    Declaration
    public FontWeight ReadOnlyFontWeight { get; set; }
    Property Value
    Type Description
    System.Windows.FontWeight

    The read only font weight.

    SearchBoxVisibility

    Get and set the SearchBoxVisibility

    Declaration
    public Visibility SearchBoxVisibility { get; set; }
    Property Value
    Type
    System.Windows.Visibility

    SelectedItems

    Get and set the SeelctedItems property

    Declaration
    public IEnumerable SelectedItems { get; set; }
    Property Value
    Type
    System.Collections.IEnumerable

    SelectedObject

    Gets or sets the object for which the grid displays properties.

    Declaration
    public object SelectedObject { get; set; }
    Property Value
    Type Description
    System.Object

    The selected object.

    SelectedPropertyItem

    Get and set the SelectedPropertyItem

    Declaration
    public PropertyItem SelectedPropertyItem { get; set; }
    Property Value
    Type
    PropertyItem

    SortDirection

    Gets or sets the type of sorting the PropertyGrid uses to display properties.

    Declaration
    public ListSortDirection? SortDirection { get; set; }
    Property Value
    Type Description
    System.Nullable<System.ComponentModel.ListSortDirection>

    The sort direction.

    UpdateSourceMode

    Gets or sets a value that determines when to update the values of SelectedObject.

    Declaration
    public UpdateSourceMode UpdateSourceMode { get; set; }
    Property Value
    Type
    UpdateSourceMode

    ViewBackgroundColor

    Gets or sets the background color of the propertyview.

    Declaration
    public Brush ViewBackgroundColor { get; set; }
    Property Value
    Type Description
    System.Windows.Media.Brush

    The color of the view background.

    VisualStyle

    Gets or sets the visual style for PropertyGrid.

    Declaration
    public string VisualStyle { get; set; }
    Property Value
    Type Description
    System.String

    The visual style.

    Methods

    CollapseCategory(String)

    Collapse the expanded category group based on the CategoryName

    Declaration
    public void CollapseCategory(string category)
    Parameters
    Type Name Description
    System.String category

    Category to collapse the CateogryGroup

    Dispose()

    Dispose to clear managed resources

    Declaration
    public void Dispose()

    ExpandCategory(String)

    Expand collapsed category group based on the CategoryName

    Declaration
    public void ExpandCategory(string category)
    Parameters
    Type Name Description
    System.String category

    Category to expand the CategoryGroup

    OnApplyTemplate()

    When overridden in a derived class, is invoked whenever application code or internal processes call System.Windows.FrameworkElement.ApplyTemplate.

    Declaration
    public override void OnApplyTemplate()

    OnCreateAutomationPeer()

    Declaration
    protected override AutomationPeer OnCreateAutomationPeer()
    Returns
    Type
    System.Windows.Automation.Peers.AutomationPeer

    OnEnableGroupingChanged(DependencyPropertyChangedEventArgs)

    Raises the EnableGroupingChanged event.

    Declaration
    protected void OnEnableGroupingChanged(DependencyPropertyChangedEventArgs args)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs args

    The System.Windows.DependencyPropertyChangedEventArgs instance containing the event data.

    OnPreviewKeyDown(KeyEventArgs)

    Occurs when a key is pressed while focus is on PropertyGrid

    Declaration
    protected override void OnPreviewKeyDown(KeyEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Input.KeyEventArgs e

    Provides data for the System.Windows.UIElement.KeyDown event

    OnPropertyChanged(DependencyPropertyChangedEventArgs)

    Invoked while any of the property get changed

    Declaration
    protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs e

    OnSelectedObjectChanged(DependencyPropertyChangedEventArgs)

    Raises the SelectedObjectChanged event.

    Declaration
    protected void OnSelectedObjectChanged(DependencyPropertyChangedEventArgs args)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs args

    The System.Windows.DependencyPropertyChangedEventArgs instance containing the event data.

    OnSelectedPropertyItemChanged(DependencyPropertyChangedEventArgs)

    Raises the SelectedPropertyItemChanged event.

    Declaration
    protected void OnSelectedPropertyItemChanged(DependencyPropertyChangedEventArgs args)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs args

    The System.Windows.DependencyPropertyChangedEventArgs instance containing the event data.

    OnSortDirectionChanged(DependencyPropertyChangedEventArgs)

    Raises the SortDirectionChanged event.

    Declaration
    protected void OnSortDirectionChanged(DependencyPropertyChangedEventArgs args)
    Parameters
    Type Name Description
    System.Windows.DependencyPropertyChangedEventArgs args

    The System.Windows.DependencyPropertyChangedEventArgs instance containing the event data.

    RefreshPropertygrid()

    Refesh the property Grid.

    Declaration
    public void RefreshPropertygrid()

    ResetAll()

    ReserAll method

    Declaration
    public void ResetAll()

    Events

    AutoGeneratingPropertyGridItem

    Occurs when propertyitem is adding to the property collection

    Declaration
    public event EventHandler<AutoGeneratingPropertyGridItemEventArgs> AutoGeneratingPropertyGridItem
    Event Type
    Type
    System.EventHandler<AutoGeneratingPropertyGridItemEventArgs>

    CollectionEditorOpening

    Occurs before Syncfusion.Windows.PropertyGrid.PropertyGrid.CollectionEditor window is opening.

    Declaration
    public event EventHandler<CollectionEditorOpeningEventArgs> CollectionEditorOpening
    Event Type
    Type
    System.EventHandler<CollectionEditorOpeningEventArgs>

    EnableGroupingChanged

    Occurs when [enable grouping changed].

    Declaration
    public event PropertyChangedCallback EnableGroupingChanged
    Event Type
    Type
    System.Windows.PropertyChangedCallback

    MenuPopupOpened

    Occurs when [MenuPopup Opened].

    Declaration
    public event MenuPopupEventHandler MenuPopupOpened
    Event Type
    Type
    MenuPopupEventHandler

    MenuPopupOpening

    Occurs when [MenuPopup Opening].

    Declaration
    public event MenuPopupEventHandler MenuPopupOpening
    Event Type
    Type
    MenuPopupEventHandler

    SelectedObjectChanged

    Occurs when [selected object changed].

    Declaration
    public event PropertyChangedCallback SelectedObjectChanged
    Event Type
    Type
    System.Windows.PropertyChangedCallback

    SelectedPropertyItemChanged

    Occurs when [selected property changed].

    Declaration
    public event PropertyChangedCallback SelectedPropertyItemChanged
    Event Type
    Type
    System.Windows.PropertyChangedCallback

    SortDirectionChanged

    Occurs when [sort direction changed].

    Declaration
    public event PropertyChangedCallback SortDirectionChanged
    Event Type
    Type
    System.Windows.PropertyChangedCallback

    ValueChanged

    Occurs when [value changed].

    Declaration
    public event ValueChangedEventHandler ValueChanged
    Event Type
    Type
    ValueChangedEventHandler

    Implements

    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved