Version

Adding xamPropertyGrid to Your Page

Topic Overview

Purpose

This topic provides detailed instructions to help you get up and running as soon as possible with the xamPropertyGrid .

Required background

The following topics are prerequisites to understanding this topic:

Topic Purpose

This topic explains the features supported by the control from developer perspective.

This topic provides an overview of the visual elements of the control.

In this topic

This topic contains the following sections:

Adding xamPropertyGrid to Your Page

Introduction

This procedure explains step by step the operations necessary for adding the xamPropertyGrid to your page.

Preview

The following screenshot is a preview of the result:

xamPropertyGrid 09.png

Overview

Following is a conceptual overview of the process:

1. Add Assembly references

2. Add Namespaces

3. Create xamPropertyGrid

4. Create an object (optional)

5. Bind/set object(s) for editing with the xamPropertyGrid

Steps

The following steps demonstrate how to add the control to your page.

1. Add NuGet package references

Add the following NuGet package reference to your project:

  • Infragistics.WPF.PropertyGrid

For more information on setting up the NuGet feed and adding NuGet packages, you can take a look at the following documentation: NuGet Feeds.

2. Add Namespaces

Add the following namespaces:

In XAML:

xmlns:ig="http://schemas.infragistics.com/xaml"

In C#:

using Infragistics.Controls.Editors;

In Visual Basic:

Import Infragistics.Controls.Editors

3. Create xamPropertyGrid

Create and put the xamPropertyGrid on your page:

In XAML:

<ig:XamPropertyGrid x:Name="xamPropertyGrid1">
</ig:XamPropertyGrid>

4. Create an object (optional)

Create the object which properties will be edited by the xamPropertyGrid .

In C#:

Button b = new Button();

In Visual Basic:

Dim b As New Button()

5. Bind/set object(s) for editing with the xamPropertyGrid

Set the object from the previous step (or an object of your choice) to the SelectedObject property.

Note
Note

You can also set an array of objects to the SelectedObjects property and edit the properties of multiple objects with similar or identical object model at once.

In C#:

this.xamPropertyGrid1.SelectedObject = b;

In Visual Basic:

Me.xamPropertyGrid1.SelectedObject = b

Related Content

Topics

The following topics provide additional information related to this topic.

Topic Purpose

This is a set of topics explaining how to configure the control.

This is a set of topics explaining how to work with the control.