Views/TreeViews.xaml

(完整代码) 1KB

<UserControl x:Class="MahAppsMetro.Demo.Views.TreeViews"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:MahAppsMetro.Demo.Views"
             xmlns:metro="http://metro.mahapps.com/winfx/xaml/controls"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800">
    <DockPanel>
        <TreeView x:Name="tv" DockPanel.Dock="Left" ItemsSource="{Binding Trees}" Width="100">
            <TreeView.ItemTemplate>
                <HierarchicalDataTemplate ItemsSource="{Binding Trees}">
                    <TextBlock Text="{Binding Index}" />
                </HierarchicalDataTemplate>
            </TreeView.ItemTemplate>
        </TreeView>
        <Border BorderThickness="1" BorderBrush="{StaticResource AccentColorBrush}" Width="1" DockPanel.Dock="Left" />
        <TabControl ItemsSource="{Binding SelectedItem.Topics, ElementName=tv}" SelectedIndex="0" metro:TabControlHelper.Underlined="TabPanel">
            <TabControl.ItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Title}" FontSize="15" />
                </DataTemplate>
            </TabControl.ItemTemplate>
            <TabControl.ContentTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Content}" />
                </DataTemplate>
            </TabControl.ContentTemplate>
        </TabControl>
    </DockPanel>
</UserControl>

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。