You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to make a treeview node initially selected by binding the checkbox IsChecked-property to a property in the node. Tested with the UraniumUI sample solution but ended up with empty space inside the tree for the selected node and the actual node is hidden.
modified the treeview.xaml with
<material:CheckBox Text="{Binding Name}" Margin="10" IsChecked="{Binding IsSelected}" >
and in TreeViewPageViewModel.cs modified one sample item
new MyItem("A.1") { IsSelected = true },
and added observable property to the MyItem-class
public virtual bool IsSelected { get => isSelected; set => SetProperty(ref isSelected, value); }
ended up with this. As you can seen the item A.1 is hidden (the space for it is still there)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I tried to make a treeview node initially selected by binding the checkbox IsChecked-property to a property in the node. Tested with the UraniumUI sample solution but ended up with empty space inside the tree for the selected node and the actual node is hidden.
modified the treeview.xaml with
<material:CheckBox Text="{Binding Name}" Margin="10" IsChecked="{Binding IsSelected}" >
and in TreeViewPageViewModel.cs modified one sample item
new MyItem("A.1") { IsSelected = true },
and added observable property to the MyItem-class
public virtual bool IsSelected { get => isSelected; set => SetProperty(ref isSelected, value); }
ended up with this. As you can seen the item A.1 is hidden (the space for it is still there)
Beta Was this translation helpful? Give feedback.
All reactions