I'm building an application using WPF that will be a designer of sorts, meaning, a user can drag and drop custom UI elements into a canvas and be able to configure their behavior via properties.
(Think of this like a domain specific PowerPoint. You can add elements to the presentation, configure the elements' properties and then eventually you can run the "slideshow" and those elements will behave according to their properties)
So in my app, what is the best way of showing and configuring an element's properties? Is there a Property Dialog control I can use? (similar to the one in Visual Studio for controls)
Sadly, there is no
PropertyGrid
control in WPF. Either you will have to use WinForms property grid or one available in open source community or buy from 3rd party vendors. You have following options to choose from -Open Source -
In case you are working on .Net 4.0 you can use WWF's
PropertyInspectorView
control as property grid in WPF. As explained in this article - http://www.codeproject.com/KB/grid/WpfPropertyGrid.aspx3rd party :
Custom -
In Case you want to build your own
PropertyGrid
, have a look at these articles -You need to use a propertygrid for this. See these posts for how to create one.
Limitations of using .NET 2.0 (Windows Forms) controls in WPF?
wpf propertyGrid