I am using you own example in Setting PropertSets
In this I've set DisplayName of FillColor property, but it don't get it's this specified display name, but rather it shows the property name.
MainWindow.xaml
<
Grid
>
<
Grid.Resources
>
<
local:ViewModel
x:Key
=
"vm"
/>
</
Grid.Resources
>
<
telerik:RadPropertyGrid
DataContext
=
"{StaticResource vm}"
Item
=
"{Binding Shapes}"
PropertySetMode
=
"Intersection"
/>
</
Grid
>
ViewModel.cs
public class ViewModel
{
public IEnumerable<
object
> Shapes
{
get
{
return new List<
object
>()
{
new Ellipse()
{
Center = new Point(1,1),
FillColor = Colors.Red,
RadiusX1 = 4, RadiusX2 = 2
},
new RegularPolygon()
{
Center = new Point(3,2),
FillColor = Colors.Blue,
CornersCount = 3,
SideLength = 10
}
};
}
}
}
public class Ellipse
{
[DisplayName("Fill Color")]
public Color FillColor { get; set; }
public double RadiusX1 { get; set; }
public double RadiusX2 { get; set; }
public Point Center {
get;
set; }
}
public class RegularPolygon
{
public int CornersCount { get; set; }
public Color FillColor { get; set; }
public Point Center {
get;
set; }
public double SideLength { get; set; }
}
Kindly suggest me it's solution.