91 lines
4.5 KiB
XML
91 lines
4.5 KiB
XML
<UserControl x:Class="InSituLaboratory.Views.Pages.Dialogs.SelectRoleView"
|
|
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:InSituLaboratory.Views.Pages.Dialogs"
|
|
mc:Ignorable="d" Template="{StaticResource DialogViewTemplate}"
|
|
Height="550" Width="400">
|
|
<UserControl.Resources>
|
|
<Style TargetType="CheckBox">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="CheckBox">
|
|
<Border BorderBrush="#409EFE" BorderThickness="1"
|
|
CornerRadius="4" Background="White"
|
|
Name="border">
|
|
<TextBlock Text="" FontFamily="{StaticResource Icons}"
|
|
VerticalAlignment="Center" HorizontalAlignment="Center"
|
|
Foreground="White"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsChecked" Value="True">
|
|
<Setter TargetName="border" Property="Background" Value="#409EFE"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</UserControl.Resources>
|
|
<Grid Margin="10">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="40"/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Border Background="#EEE" Height="1" VerticalAlignment="Bottom"/>
|
|
<TextBox Text="{Binding FilterText,UpdateSourceTrigger=PropertyChanged}"
|
|
Style="{StaticResource NormalTextBoxStyle}"
|
|
VerticalContentAlignment="Center"
|
|
Margin="0,3" VerticalAlignment="Top" Height="30"/>
|
|
|
|
|
|
<ListBox ItemsSource="{Binding Roles}" Grid.Row="1" Margin="5"
|
|
BorderThickness="0" Background="Transparent"
|
|
SelectionMode="Multiple"
|
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
|
|
<ListBox.ItemContainerStyle>
|
|
<Style TargetType="ListBoxItem">
|
|
<Setter Property="IsSelected" Value="{Binding IsSelected}"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ListBoxItem">
|
|
<Border Background="Transparent" Name="border">
|
|
<ContentPresenter/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="border" Property="Background" Value="#F7F9FA"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ListBox.ItemContainerStyle>
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid Background="Transparent" Height="40">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="30"/>
|
|
<ColumnDefinition Width="80"/>
|
|
<ColumnDefinition/>
|
|
</Grid.ColumnDefinitions>
|
|
<Border Height="1" Background="#EEE" VerticalAlignment="Bottom" Grid.ColumnSpan="4"/>
|
|
<CheckBox IsChecked="{Binding IsSelected}" VerticalAlignment="Center"
|
|
HorizontalAlignment="Center" Width="16" Height="16"/>
|
|
<TextBlock Text="{Binding RoleName}" Grid.Column="1"
|
|
VerticalAlignment="Center"
|
|
Foreground="#666"/>
|
|
<TextBlock Text="{Binding RoleDesc}" Grid.Column="2"
|
|
VerticalAlignment="Center" Foreground="#AAA"
|
|
TextTrimming="CharacterEllipsis"/>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
|
|
</Grid>
|
|
</UserControl>
|