Invalidate IsLimitedToStandardValues

Grids for WPF Forum

Posted 6 months ago by BenjaminLopVic - France
Version: 24.1.1
Avatar

Hello,

I followed the PropertyGridDynamicProperties sample for my application, and it works as I want, except for IsLimitedToStandardValues. I can't invalidate it in the same way as IsReadOnly, for example. Is this possible?

Thanks.
Benjamin.
 

Comments (2)

Answer - Posted 6 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

The IPropertyModel.IsLimitedToStandardValues property is used by the DataTemplateSelector instance assigned to the PropertyGrid.ValueTemplateSelector property.  That selector chooses the editor DataTemplate to use for each property's "value" cell.

Changing that value on the fly won't affect anything since it's not bound to any UI properties.  It's only used when choosing the DataTemplate as the property's "value" cell is created.  The only way to get a new value to take effect would be to trigger the PropertyGrid's row to be re-created somehow, such as by a PropertyGrid.Refresh().

Alternatively you could create a custom property editor for this property so that you can manage the UI for it yourself, such as with a custom UI control that would have logic built-in to support switching how you need.


Actipro Software Support

Posted 6 months ago by BenjaminLopVic - France
Avatar

Hello,

Thank you for your response.

I ended up using another workaround. Since it's possible to invalidate IsVisible, I replaced my property with two properties, one that has StandardValues and the other that doesn't.

Benjamin.

 
 
The latest build of this product (v24.1.5) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.