Is the DisplayFormat attribute supported. It doesn't seem to be and I'm wondering if there is a way to format the property values using the built-in expandable property editor.
public struct SerializableBounds {
public SerializableBounds(double x, double y, double width, double height) {
Location = new SerializablePoint(x, y);
Size = new SerializableSize(width, height);
}
public SerializableBounds(SerializablePoint location, SerializableSize size) {
Location = location;
Size = size;
}
public SerializablePoint Location;
public SerializableSize Size;
[DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:N0}")]
[NotifyParentProperty(true)]
public double Width {
get =>
Size.Width;
set =>
Size.Width = value;
}
[DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:N0}")]
[NotifyParentProperty(true)]
public double Height {
get =>
Size.Height;
set =>
Size.Height = value;
}
[DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:N0}")]
[NotifyParentProperty(true)]
public double X {
get =>
Location.X;
set =>
Location.X = value;
}
[DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:N0}")]
[NotifyParentProperty(true)]
public double Y {
get =>
Location.Y;
set =>
Location.Y = value;
}
}