Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
860
XamDataTree ActiveNode not highlighted when it is set programmably
posted

When the ActiveNode of the XamDataTree is set programmably, the previous active node is still highlighted, there's only a boarder around the new active node. Please see the screenshot below, the "Main2" node is previous selected node, I programmably change the ActiveNode to "Main10".

XamDataTree_ActvieNode

Here's the xaml:

<Grid>
   <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
   </Grid.RowDefinitions>

<ig:XamDataTree ItemsSource="{Binding Items}" DisplayMemberPath="Caption" 
                    ActiveDataItem="{Binding SelectedItem, Mode=TwoWay}" x:Name="theTree">

        <ig:XamDataTree.SelectionSettings>
                <ig:TreeSelectionSettings NodeSelection="Single"/>
        </ig:XamDataTree.SelectionSettings>
        <ig:XamDataTree.GlobalNodeLayouts>
              <ig:NodeLayout Key="ParentLayout" 
                        TargetTypeName="NavigationItem" 
                        DisplayMemberPath="Caption"/>
              </ig:XamDataTree.GlobalNodeLayouts>
        </ig:XamDataTree>

       <Button Grid.Row="1" Click="Button_Click" >test</Button>
</Grid>

Here's the Code behind: 

private void Button_Click(object sender, RoutedEventArgs e)
{
    this.theTree.ActiveNode = this.theTree.Nodes[4];
}

How to unselect the previous active node (make it not highlighted), and highlight the new active node?

Thanks.