Files
serein-flow/Workbench/Customs/FlowMethodInfoListBox.xaml
2025-05-30 23:31:31 +08:00

31 lines
1.8 KiB
XML

<UserControl x:Class="Serein.Workbench.Customs.FlowMethodInfoListBox"
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:converter="clr-namespace:Serein.Workbench.Converters"
xmlns:local="clr-namespace:Serein.Workbench.Customs"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<converter:CountToVisibilityConverter x:Key="CountToVisibilityConverter"/>
</UserControl.Resources>
<ListBox SelectionChanged="ListBox_SelectionChanged"
ItemsSource="{Binding ItemsSource, RelativeSource={RelativeSource AncestorType=UserControl}}"
Visibility="{Binding ItemsSource, RelativeSource={RelativeSource AncestorType=UserControl}, Converter={StaticResource CountToVisibilityConverter}}"
Background="{Binding Background, RelativeSource={RelativeSource AncestorType=UserControl}}">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Margin="2" MouseLeftButtonDown="Grid_MouseLeftButtonDown" MouseMove="Grid_MouseMove" DataContext="{Binding}">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding NodeType}"/>
<TextBlock Text="{Binding MethodAnotherName}" Margin="4,0,0,0"/>
<TextBlock Text="{Binding MethodName}" Margin="6,0,0,0"/>
</StackPanel>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</UserControl>