c# - Setting MaxWidth at runtime in WPF -
c# - Setting MaxWidth at runtime in WPF -
this .net 4.5 wpf question. trying set maxwidth of frameworkelement defined in xaml (specifically, expander) programmatically, i've tried
myframeworkelement.maxwidth = value myframeworkelement.setvalue(maxwidthproperty,value) -and- myframeworkelement.dispatcher.invoke(() => maxwidth = value);no joy. when run through debugger, maxwidth stubbornly remains @ value specified @ compile-time in xaml. possible set maxwidth , maxheight @ runtime?
thanks.
try set maxwidth of command in double in code. example, textbox names txttest can set maxwidth below.
txttest.maxwidth=300.0;
in case of expander mechanism works properly. can show me xaml how have defined expander
c# wpf xaml .net-4.5
Comments
Post a Comment