Hi, I have a control that inherits from TreeView (System.Windows.Controls.TreeView from WPF Framework) and it implements a GridViewColumnCollection to show columns next to the tree. However now I need to implement AllowColumnReorder in case we don't want users to reorder the columns, how can I achieve this? Here's the code for the TreeView:
public class TreeListView : TreeView
{
protected override DependencyObject GetContainerForItemOverride()
{
return new TreeListViewItem();
}
protected override bool IsItemItsOwnContainerOverride(object item)
{
return item is TreeListViewItem;
}
#region Public Properties
private GridViewColumnCollection _columns;
public GridViewColumnCollection Columns
{
get
{
if (_columns == null)
{
_columns = new GridViewColumnCollection();
}
return _columns;
}
}
public bool AllowColumnReorder { get; set; }
#endregion
}
Thank you!