开发者

setting vertical scroll bar of scrollviewer to be visible

开发者 https://www.devze.com 2023-03-12 20:05 出处:网络
i am trying to set the verticalscrollbar visibility to be visible during a button click event. Why can\'t i do something like this?

i am trying to set the verticalscrollbar visibility to be visible during a button click event. Why can't i do something like this?

before click event, XAML:

<ScrollViewer VerticalScrollBarVisibility="Hidden" Height="178.75" Width="680" Name="Scroller">

button click开发者_如何学运维 event in C#:

Scroller.VerticalScrollBarVisibility = Visibility.Visible;


-.-

It's the wrong enumeration:

Scroller.VerticalScrollBarVisibility =  ScrollBarVisibility.Visible;

You should really check the types of properties before assigning random stuff to it.

0

精彩评论

暂无评论...
验证码 换一张
取 消