wpf - Using StaticResource to set ListView's Height property throws exception -
wpf - Using StaticResource to set ListView's Height property throws exception -
i define "displayheight" in app.xaml file here:
<application.resources> <sys:int32 x:key="displayheight">534</sys:int32> </application.resources> i seek set listview height here:
<grid> <listview x:name="mylistview" height="{staticresource displayheight}"/> </grid> this results in next exception:
{"'534' not valid value property 'height'."} i don't understand why wouldn't work. can manually set height 534 , works. also, read controls "height" "int32" shouldn't type problem...
height double, need declare such if want utilize staticresource directly.
alternatively wrap in binding uses type converters:
class="lang-xml prettyprint-override">height="{binding source={staticresource displayheight}}" wpf xaml
Comments
Post a Comment