130 lines
7.4 KiB
XML
130 lines
7.4 KiB
XML
<UserControl x:Class="Livia.Views.Controls.RoiExpanderGroupControl"
|
|
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:controls="clr-namespace:Livia.Views.Controls"
|
|
xmlns:viewModels="clr-namespace:Livia.ViewModels"
|
|
d:DataContext="{d:DesignInstance Type=viewModels:RoiExpanderGroupControlViewModel}"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="450"
|
|
d:DesignWidth="800">
|
|
<StackPanel Visibility="{Binding Visible, Converter={StaticResource BooleanToVisibilityConverter}}">
|
|
<Grid Margin="11, 6, 0, 6"
|
|
Visibility="{Binding ShowHeader, Converter={StaticResource BooleanToVisibilityConverter}}">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<CheckBox Grid.Column="0"
|
|
IsChecked="{Binding RoiViewModelCollection.CheckBoxChecked, UpdateSourceTrigger=PropertyChanged}"
|
|
Background="{StaticResource White1Brush}"
|
|
d:IsChecked="True" Cursor="Hand"
|
|
VerticalAlignment="Top" Margin="0,8"/>
|
|
<StackPanel Grid.Column="1" Margin="14, 0, 0, 0">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}"
|
|
Text="{Binding Name, StringFormat={}{0}}"
|
|
d:Text="L1区"
|
|
Foreground="{StaticResource White1Brush}">
|
|
<TextBlock.Effect>
|
|
<DropShadowEffect ShadowDepth="0"
|
|
Color="{Binding Color}"
|
|
Opacity="1"
|
|
BlurRadius="1" />
|
|
</TextBlock.Effect>
|
|
</TextBlock>
|
|
<TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}"
|
|
Margin="5, 0, 0, 0"
|
|
Text="{StaticResource Count}"
|
|
|
|
Foreground="{StaticResource White1Brush}">
|
|
<TextBlock.Effect>
|
|
<DropShadowEffect ShadowDepth="0"
|
|
Color="{Binding Color}"
|
|
Opacity="1"
|
|
BlurRadius="1" />
|
|
</TextBlock.Effect>
|
|
</TextBlock>
|
|
<TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}"
|
|
Foreground="{StaticResource White1Brush}"
|
|
Text="{Binding SelectedCount,StringFormat={}({0}}">
|
|
<TextBlock.Effect>
|
|
<DropShadowEffect ShadowDepth="0"
|
|
Color="{Binding Color}"
|
|
Opacity="1"
|
|
BlurRadius="1" />
|
|
</TextBlock.Effect>
|
|
</TextBlock>
|
|
<TextBlock Style="{StaticResource MaterialDesignBody1TextBlock}"
|
|
Foreground="{StaticResource White1Brush}"
|
|
Text="{Binding TotalCount,StringFormat={}/{0})}">
|
|
<TextBlock.Effect>
|
|
<DropShadowEffect ShadowDepth="0"
|
|
Color="{Binding Color}"
|
|
Opacity="1"
|
|
BlurRadius="1" />
|
|
</TextBlock.Effect>
|
|
</TextBlock>
|
|
</StackPanel>
|
|
<UniformGrid Rows="1" Margin="0,0,65,0">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Style="{StaticResource MaterialDesignBody2TextBlock}"
|
|
Text="{StaticResource TotalVolume}"
|
|
Foreground="{StaticResource White1Brush}">
|
|
<TextBlock.Effect>
|
|
<DropShadowEffect ShadowDepth="0"
|
|
Color="{Binding Color}"
|
|
Opacity="1"
|
|
BlurRadius="1" />
|
|
</TextBlock.Effect>
|
|
</TextBlock>
|
|
<TextBlock Style="{StaticResource MaterialDesignBody2TextBlock}"
|
|
Text="{Binding TotalVolume, StringFormat={}({0:N3}ml)}"
|
|
Foreground="{StaticResource White1Brush}">
|
|
<TextBlock.Effect>
|
|
<DropShadowEffect ShadowDepth="0"
|
|
Color="{Binding Color}"
|
|
Opacity="1"
|
|
BlurRadius="1" />
|
|
</TextBlock.Effect>
|
|
</TextBlock>
|
|
</StackPanel>
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
|
<TextBlock Style="{StaticResource MaterialDesignBody2TextBlock}"
|
|
Text="{StaticResource SelectedVolume}"
|
|
Foreground="{StaticResource White1Brush}">
|
|
<TextBlock.Effect>
|
|
<DropShadowEffect ShadowDepth="0"
|
|
Color="{Binding Color}"
|
|
Opacity="1"
|
|
BlurRadius="1" />
|
|
</TextBlock.Effect>
|
|
</TextBlock>
|
|
<TextBlock Style="{StaticResource MaterialDesignBody2TextBlock}"
|
|
Text="{Binding SelectedVolume, StringFormat={}({0:N3}ml)}"
|
|
Foreground="{StaticResource White1Brush}">
|
|
<TextBlock.Effect>
|
|
<DropShadowEffect ShadowDepth="0"
|
|
Color="{Binding Color}"
|
|
Opacity="1"
|
|
BlurRadius="1" />
|
|
</TextBlock.Effect>
|
|
</TextBlock>
|
|
</StackPanel>
|
|
|
|
</UniformGrid>
|
|
</StackPanel>
|
|
</Grid>
|
|
<ItemsControl ItemsSource="{Binding RoiViewModelCollection.Items}"
|
|
ScrollViewer.CanContentScroll="True"
|
|
VirtualizingStackPanel.IsVirtualizing="True">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<controls:RoiExpanderControl DataContext="{Binding }" />
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</StackPanel>
|
|
</UserControl>
|