2022-08-31 18:47:19 +02:00
|
|
|
<Window
|
|
|
|
|
x:Class="PowerAccent.UI.Selector"
|
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
|
xmlns:local="clr-namespace:PowerAccent"
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
|
Title="MainWindow"
|
|
|
|
|
Width="50"
|
|
|
|
|
Height="50"
|
|
|
|
|
ResizeMode="NoResize"
|
|
|
|
|
ShowInTaskbar="False"
|
|
|
|
|
SizeToContent="WidthAndHeight"
|
|
|
|
|
Visibility="Collapsed"
|
|
|
|
|
WindowStyle="None"
|
|
|
|
|
mc:Ignorable="d">
|
2022-08-26 18:01:50 +02:00
|
|
|
<Grid>
|
2022-08-31 18:47:19 +02:00
|
|
|
<ListBox
|
|
|
|
|
x:Name="characters"
|
|
|
|
|
HorizontalContentAlignment="Stretch"
|
|
|
|
|
VerticalContentAlignment="Stretch"
|
|
|
|
|
BorderBrush="SlateGray"
|
|
|
|
|
BorderThickness="1"
|
|
|
|
|
IsHitTestVisible="False">
|
2022-08-26 18:01:50 +02:00
|
|
|
<ListBox.ItemsPanel>
|
|
|
|
|
<ItemsPanelTemplate>
|
|
|
|
|
<VirtualizingStackPanel IsItemsHost="False" Orientation="Horizontal" />
|
|
|
|
|
</ItemsPanelTemplate>
|
|
|
|
|
</ListBox.ItemsPanel>
|
|
|
|
|
<ListBox.ItemTemplate>
|
|
|
|
|
<DataTemplate>
|
2022-08-31 18:47:19 +02:00
|
|
|
<TextBlock
|
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
|
FontSize="18"
|
|
|
|
|
Text="{Binding}"
|
|
|
|
|
TextAlignment="Center" />
|
2022-08-26 18:01:50 +02:00
|
|
|
</DataTemplate>
|
|
|
|
|
</ListBox.ItemTemplate>
|
|
|
|
|
<ListBox.ItemContainerStyle>
|
|
|
|
|
<Style x:Name="ItemStyle" TargetType="ListBoxItem">
|
|
|
|
|
<Setter Property="Template">
|
|
|
|
|
<Setter.Value>
|
|
|
|
|
<ControlTemplate TargetType="{x:Type ListBoxItem}">
|
2022-08-31 18:47:19 +02:00
|
|
|
<Border
|
|
|
|
|
x:Name="myBorder"
|
|
|
|
|
Margin="0"
|
|
|
|
|
Padding="0"
|
2022-08-26 18:01:50 +02:00
|
|
|
SnapsToDevicePixels="true"
|
|
|
|
|
Style="{DynamicResource borderContent}">
|
|
|
|
|
<ContentPresenter />
|
|
|
|
|
</Border>
|
|
|
|
|
<ControlTemplate.Resources>
|
|
|
|
|
<Style x:Key="borderContent" TargetType="Border">
|
2022-08-31 18:47:19 +02:00
|
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
|
|
|
<Setter Property="BorderBrush" Value="Transparent" />
|
|
|
|
|
<Setter Property="Background" Value="#ECECEC" />
|
|
|
|
|
<Setter Property="Width" Value="50" />
|
|
|
|
|
<Setter Property="Height" Value="50" />
|
2022-08-26 18:01:50 +02:00
|
|
|
</Style>
|
|
|
|
|
</ControlTemplate.Resources>
|
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
|
<Trigger Property="IsSelected" Value="true">
|
2022-08-31 18:47:19 +02:00
|
|
|
<Setter TargetName="myBorder" Property="Background" Value="White" />
|
|
|
|
|
<Setter Property="FontWeight" Value="Bold" />
|
2022-08-26 18:01:50 +02:00
|
|
|
</Trigger>
|
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
|
</ControlTemplate>
|
|
|
|
|
</Setter.Value>
|
|
|
|
|
</Setter>
|
|
|
|
|
</Style>
|
|
|
|
|
</ListBox.ItemContainerStyle>
|
|
|
|
|
</ListBox>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Window>
|