JD2022-TU1/main/tools/modules/JD.Plugin.WPF.Module/Views/ToolWindowContent.xaml

45 lines
2.7 KiB
XML

<UserControl x:Class="JD.Plugin.WPF.Module.Views.ToolWindowContent"
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:viewModel="clr-namespace:JD.Plugin.WPF.Module.ViewModel"
xmlns:grids="http://schemas.actiprosoftware.com/winfx/xaml/grids"
xmlns:converters="clr-namespace:Plume.WPF.Converters;assembly=Plume.WPF"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300"
d:DataContext="{d:DesignInstance Type=viewModel:ToolWindowContentViewModel}">
<UserControl.Resources>
<converters:DebugConverter x:Key="DebugConverter" />
</UserControl.Resources>
<grids:TreeListView RootItem="{Binding}">
<grids:TreeListView.ItemAdapter>
<grids:TreeListBoxItemAdapter ChildrenBinding="{Binding Path=PluginCollection}" ChildrenPath="Plugins"/>
</grids:TreeListView.ItemAdapter>
<grids:TreeListView.Columns>
<grids:TreeListViewColumn Header="Name" Width="*">
<DataTemplate DataType="viewModel:PluginViewModel">
<TextBlock Text="{Binding Path=Name}" DockPanel.Dock="Left"></TextBlock>
</DataTemplate>
</grids:TreeListViewColumn>
<grids:TreeListViewColumn Header="Cnx" Width="Auto">
<DataTemplate DataType="viewModel:PluginViewModel">
<Image Width="24" Height="24" HorizontalAlignment="Center" VerticalAlignment="Center" DockPanel.Dock="Right">
<Image.Style>
<Style TargetType="{x:Type Image}" >
<Setter Property="Source" Value="../Resources/Connected_24x.png" />
<Setter Property="ToolTip" Value="Connected" />
<Style.Triggers>
<DataTrigger Binding="{Binding Path=IsConnected}" Value="False">
<Setter Property="Source" Value="../Resources/Disconnected_24x.png"></Setter>
<Setter Property="ToolTip" Value="Not connected" />
</DataTrigger>
</Style.Triggers>
</Style>
</Image.Style>
</Image>
</DataTemplate>
</grids:TreeListViewColumn>
</grids:TreeListView.Columns>
</grids:TreeListView>
</UserControl>