Setting Dynamically CheckBoxVisibility, SpinnerVisibility et

Grids for WPF Forum

Posted 14 years ago by Eli Obadia
Version: 10.1.0523
Avatar
If I am programatically (dynamically) creating a property and I'm using something like:
[Editor(typeof(NullableDoublePropertyEditor), typeof(PropertyEditor))]

How can I define the the CheckBoxVisibility and the SpinnerVisibility to be Visible
to get something like this:

<propgrideditors:NullableDoublePropertyEditor CheckBoxVisibility="Visible" SpinnerVisibility="Visible" />

The same applies for NullableDateTimePropertyEdito to set up: Format="d" or Format="t"

Thanka!,
Eli

Comments (2)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Eli,

When using the EditorAttribute, the only thing you can pass is a type. So if you want to set certain properties, you'd have to create a custom type. Something like:
public class MyNullableDoublePropertyEditor : NullableDoublePropertyEditor {
    public MyNullableDoublePropertyEditor() {
        this.CheckBoxVisibility = Visibility.Visible;
        this.SpinnerVisibility = Visibility.Visible;
    }
}


Actipro Software Support

Posted 14 years ago by Eli Obadia
Avatar
GREAT!,

Thanks,
Eli
The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.