c# - Visibility of ViewBox set from code -
on window, have viewbox control, contains custom progress bar. set visibility collapsed in design mode, because need display in moment (during login app).
in progress bar, usercontrol, have event handler visibilitychanged event stop , start animation.
when user clicks on login button, need show viewbox until login completed , collapse 1 time again after success. but, when (in code behind) set viewbox.visibility = visible, doesn't show up.
can tell me why, or how prepare ?
xaml:
<viewbox x:name="cpprogress" width="50" height="50" horizontalalignment="center" verticalalignment="bottom" grid.row="1" visibility="collapsed" > <lc:circularprogress /> </viewbox>
thanks
change viewbox.visibility = visible
cpprogress.visibility = visible
, ensure grid has proper row height defined row 1.
c# wpf visibility viewbox
No comments:
Post a Comment