Quantcast
Channel: Our ComponentOne » All Posts
Viewing all articles
Browse latest Browse all 14170

Reply To: Block the collapse/expand button treeview

$
0
0

Hi,

Since, you’ve already implemented custom-style, the best way out is to inherit the control (C1TreeViewItem), fetch the expand/collapse button and then set its Visibility to false.

public class MyTreeViewItem : C1.Silverlight.C1TreeViewItem
{
    public override void OnApplyTemplate()
    {
        base.OnApplyTemplate();
        var _btn = GetTemplateChild("ExpandButton") as C1.Silverlight.C1TreeViewExpandButton;
        if (_btn != null)
           _btn.Visibility = System.Windows.Visibility.Collapsed;
    }
}

~Anupam


Viewing all articles
Browse latest Browse all 14170

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>