mirror of
https://github.com/libretro/MesenCE.git
synced 2026-11-11 11:11:25 -10:00
39 lines
1.2 KiB
XML
39 lines
1.2 KiB
XML
<UserControl
|
|
xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:l="using:Mesen.Localization"
|
|
xmlns:u="using:Mesen.Utilities"
|
|
xmlns:cp="using:Avalonia.Markup.Xaml.Converters"
|
|
mc:Ignorable="d" d:DesignWidth="400" d:DesignHeight="50"
|
|
x:Name="root"
|
|
HorizontalAlignment="Stretch"
|
|
x:Class="Mesen.Debugger.Controls.ColorPickerField"
|
|
>
|
|
<UserControl.Resources>
|
|
<u:ArgbColorToBrushConverter x:Key="ColorToBrushConverter" />
|
|
</UserControl.Resources>
|
|
|
|
<StackPanel Orientation="Horizontal" DataContext="{Binding ElementName=root}">
|
|
<Button
|
|
MinWidth="0"
|
|
Padding="0"
|
|
Margin="1"
|
|
BorderThickness="0"
|
|
Background="Transparent"
|
|
Click="OnColorClick"
|
|
>
|
|
<WrapPanel>
|
|
<Border
|
|
BorderBrush="{DynamicResource MesenBlackBorderColor}"
|
|
BorderThickness="1"
|
|
Background="{Binding Color, Converter={StaticResource ColorToBrushConverter}}"
|
|
Width="20"
|
|
Height="20"
|
|
/>
|
|
<TextBlock Text="{Binding Text}" VerticalAlignment="Center" Margin="5 0" />
|
|
</WrapPanel>
|
|
</Button>
|
|
</StackPanel>
|
|
</UserControl> |