<UserControl xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:vm="clr-namespace:Avalonia.Diagnostics.ViewModels"
             x:Class="Avalonia.Diagnostics.Views.TreePageView">
  <Grid ColumnDefinitions="0.35*,4,0.65*">
    <TreeView Name="tree"
              BorderThickness="0"
              Items="{Binding Nodes}"
              SelectedItem="{Binding SelectedNode, Mode=TwoWay}">
      <TreeView.DataTemplates>
        <TreeDataTemplate DataType="vm:TreeNode"
                          ItemsSource="{Binding Children}">
          <StackPanel Orientation="Horizontal" Spacing="8">
            <TextBlock Text="{Binding Type}" FontWeight="{Binding FontWeight}"/>
            <TextBlock Text="{Binding Classes}"/>
            <TextBlock Foreground="Gray" Text="{Binding ElementName}"/>
          </StackPanel>
        </TreeDataTemplate>
      </TreeView.DataTemplates>
      <TreeView.Styles>
        <Style Selector="TreeViewItem">
          <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}"/>
          <Setter Property="Background" Value="Transparent" />
        </Style>
      </TreeView.Styles>
    </TreeView>

    <GridSplitter Background="{DynamicResource ThemeControlMidBrush}" Width="1" Grid.Column="1"/>
    <ContentControl Content="{Binding Details}" Grid.Column="2"/>
  </Grid>
</UserControl>
