Skip to content

DevExpress-Examples/wpf-property-grid-display-object-properties

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Files to look at:

WPF Property Grid - Display object properties

The PropertyGridControl is the control designed to edit object properties. It can be bound to a specific object as well as a collection of objects.


To browse and manage properties of a specific object, set the  PropertyGridControl.SelectedObject property to this object.

public partial class MainWindow {
    public MainWindow() {
        DataContext = new Contact("Carolyn", "Baker");
        InitializeComponent();
    }
}
public class Contact {
    public string FirstName { get; set; }
    public string LastName { get; set; }
    public Contact(string firstName, string lastName) {
        FirstName = firstName;
        LastName = lastName;
    }
}
<dxprg:PropertyGridControl SelectedObject="{Binding Path=.}"/>


To edit properties of multiple objects simultaneously, use PropertyGridControl.SelectedObjects.

public partial class MainWindow {
    public MainWindow() {
        DataContext = new List<Contact> { new Contact("Carolyn", "Baker"), new Contact("Amber", "Seaman") };
        InitializeComponent();
    }
}
<dxprg:PropertyGridControl SelectedObjects="{Binding Path=.}" ExpandCategoriesWhenSelectedObjectChanged="True"/>


Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

Contributors 3

  •  
  •  
  •  
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy