开发者

How can I link a Button to a TreeView?

开发者 https://www.devze.com 2023-02-16 14:23 出处:网络
Hi everybody i\'m new in this,i\'m doing the designing a program(don\'t know barely nothing of coding), i need to link a button to a TreeView to appear,so when i click the button the treeview shows,wh

Hi everybody i'm new in this,i'm doing the designing a program(don't know barely nothing of coding), i need to link a button to a TreeView to appear,so when i click the button the treeview shows,when开发者_StackOverflow中文版 clicking other button,another treeview appears.

How can i do this?

Thanks

Im newbie!


Name the tree view controls with an x:Name attribute in the XAML. This will give you an instance which you can manipulate from code behind.

Subscribe to the click event of the button.

Set the Visibility property of the tree view to Visibility.Collapsed or Visibility.Visible in the click handler code.

0

精彩评论

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