xaml - 'Collapsed' is not a valid value for the 'System.Windows.UIElement.Visibility' property on a Setter -
i'm struggling know going wrong, not why.
the following entry in resource dictionary works
<setter property="visibility" value="collapsed" />
i need make dynamic , bind value static property, , failing.
<setter property="visibility" value="{x:static loc:statemachine.collaspseorvisiblestring}" />
and returns following exception
'collapsed' not valid value 'system.windows.uielement.visibility' property on setter.
the static property returning string "collapsed" i'm lost why it's not valid.
you need bind returns value of visibility enumeration type, not string:
http://msdn.microsoft.com/en-us/library/system.windows.visibility%28v=vs.95%29.aspx
i.e. change statemachine.collapseorvisible property return type 'visibility' , have return visibility.collapsed (the enumeration value, not string)
Comments
Post a Comment