Silverlight Property Status - Visibility should be Collapsed / Collapsible when not in broken rule

Silverlight Property Status - Visibility should be Collapsed / Collapsible when not in broken rule

Old forum URL: forums.lhotka.net/forums/t/7223.aspx


Jaans posted on Friday, July 03, 2009

The Property Status control is great! Especially the additional Warning & Information icons, that depend on the severity.

I have a scenario that requires me to have the property status control's visibility set to collapsed when there is no icon to display (ie. no broken rule).
The idea is that I have a grid column with a textbox and a property status control. Unfortunately the property status control sucks up the space next to the textbox even when it's not showing anything, making it look very ackward when the border of the textbox is in the middle of the cell and not aligned to the edge.

If the proprerty status control was only visible when it needed to show something, the textbox could stretch and fill the space nicely.

This prompted me to request an addition to the wishlist, should the greater good have the same need. Perhaps a new property on the PropertyStatus could be added to specify whether the user want to reserve the space for the control or to collapse.

As an aside, unfortunately PropertyChanged events aren't being raised for IsDirty/IsSelfDirty/IsValid/IsSelfValid properties (see forum post http://forums.lhotka.net/forums/34510/ShowThread.aspx#34510).

This prohibits me from simply binding IsSelfValid to the property status's visibility as a crude mechanism to hide the control.

RockfordLhotka replied on Sunday, July 05, 2009

There's an item in the wish list to add an auto-collapse feature to PropertyStatus.

And there's an item in the wish list to add IsDirty/IsValid to CslaDataProvider.

I hope to do both these things as I work on 3.7. A lot of things need to change in the UI controls (for SL) in 3.7 due to the new element binding in SL3. If I do add this feature on the SL side, I'll probably add it on the WPF side too.

Copyright (c) Marimer LLC