This question is locked. New answers and comments are not allowed.
Hi,
I have a project that involves using a PropertyGrid in a MVVM model. I have searched and could not find an example.
I need to change PropertyDefinitions dynamically at runtime, meaning bind to a list of definitions at runtime.
Example: (This code does not work, how can I make it work ?)
// class that holds each definition
public class MyProperties
{
public string DisplayName { get; set; }
public string GroupName { get; set; }
public string Description { get; set; }
public object Value { get; set; }
}
public class MainViewModel
{
// property that is bound to the "Item" property in RadPropetyGrid control
public object CurrProperties { get; set; }
public MainViewModel()
{
var list = new List<MyProperties>();
list.Add( new MyProperties
{
DisplayName = "String Property",
GroupName = "MyGroup",
Description = "This is a test for a string property",
Value = "My String Value"
});
list.Add(...
CurrProperties = list;
}
}
Thanks
I have a project that involves using a PropertyGrid in a MVVM model. I have searched and could not find an example.
I need to change PropertyDefinitions dynamically at runtime, meaning bind to a list of definitions at runtime.
Example: (This code does not work, how can I make it work ?)
// class that holds each definition
public class MyProperties
{
public string DisplayName { get; set; }
public string GroupName { get; set; }
public string Description { get; set; }
public object Value { get; set; }
}
public class MainViewModel
{
// property that is bound to the "Item" property in RadPropetyGrid control
public object CurrProperties { get; set; }
public MainViewModel()
{
var list = new List<MyProperties>();
list.Add( new MyProperties
{
DisplayName = "String Property",
GroupName = "MyGroup",
Description = "This is a test for a string property",
Value = "My String Value"
});
list.Add(...
CurrProperties = list;
}
}
Thanks