|
|
@@ -2,8 +2,24 @@
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
xmlns:views="using:Avalonia.Diagnostics.Views"
|
|
|
xmlns:viewModels="using:Avalonia.Diagnostics.ViewModels"
|
|
|
+ xmlns:convertes="using:Avalonia.Diagnostics.Converters"
|
|
|
x:Class="Avalonia.Diagnostics.Views.MainView"
|
|
|
x:DataType="viewModels:MainViewModel">
|
|
|
+ <UserControl.Resources>
|
|
|
+ <x:Double x:Key="SampleSize">16</x:Double>
|
|
|
+ <convertes:BrushSelectorConveter x:Key="bsc"
|
|
|
+ Brush="{DynamicResource HighlightBrush}"/>
|
|
|
+ </UserControl.Resources>
|
|
|
+ <UserControl.Styles>
|
|
|
+ <Style Selector="Border.Sample">
|
|
|
+ <Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderHighBrush}"/>
|
|
|
+ <Setter Property="BorderThickness" Value="1"/>
|
|
|
+ <Setter Property="Grid.Column" Value="1"/>
|
|
|
+ <Setter Property="Width" Value="{StaticResource SampleSize}"/>
|
|
|
+ <Setter Property="Height" Value="{StaticResource SampleSize}"/>
|
|
|
+ <Setter Property="Margin" Value="10 0 -20 0"/>
|
|
|
+ </Style>
|
|
|
+ </UserControl.Styles>
|
|
|
<Grid Name="rootGrid" RowDefinitions="Auto,Auto,*,Auto,0,Auto">
|
|
|
<Menu>
|
|
|
<MenuItem Header="_File">
|
|
|
@@ -61,8 +77,7 @@
|
|
|
IsChecked="{Binding ShowDetailsPropertyType}"
|
|
|
IsEnabled="False"/>
|
|
|
</MenuItem.Icon>
|
|
|
-
|
|
|
- </MenuItem>
|
|
|
+ </MenuItem>
|
|
|
</MenuItem>
|
|
|
</MenuItem>
|
|
|
<MenuItem Header="_Overlays">
|
|
|
@@ -101,6 +116,145 @@
|
|
|
IsEnabled="False" />
|
|
|
</MenuItem.Icon>
|
|
|
</MenuItem>
|
|
|
+ <MenuItem Header="Focus Highlighter" Grid.IsSharedSizeScope="True">
|
|
|
+ <MenuItem.Items>
|
|
|
+ <!-- None -->
|
|
|
+ <MenuItem Command="{Binding SelectFocusHighlighter}"
|
|
|
+ CommandParameter="{x:Null}">
|
|
|
+ <MenuItem.Header>
|
|
|
+ <Grid>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition/>
|
|
|
+ <ColumnDefinition SharedSizeGroup="Sample"/>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <TextBlock Text="(none)"
|
|
|
+ VerticalAlignment="Center"/>
|
|
|
+ <Border Classes="Sample"/>
|
|
|
+ </Grid>
|
|
|
+ </MenuItem.Header>
|
|
|
+ <MenuItem.Icon>
|
|
|
+ <Border CornerRadius="8"
|
|
|
+ Width="16"
|
|
|
+ Height="16"
|
|
|
+ BorderBrush="{DynamicResource ThemeBorderHighBrush}"
|
|
|
+ BorderThickness="1"
|
|
|
+ >
|
|
|
+ <Border Background="{Binding FocusHighlighter,Converter={StaticResource bsc},ConverterParameter={x:Null}}"
|
|
|
+ Margin="2"
|
|
|
+ CornerRadius="6"/>
|
|
|
+ </Border>
|
|
|
+ </MenuItem.Icon>
|
|
|
+ </MenuItem>
|
|
|
+ <!-- Red -->
|
|
|
+ <MenuItem Command="{Binding SelectFocusHighlighter}"
|
|
|
+ CommandParameter="{x:Static Brushes.Red}">
|
|
|
+ <MenuItem.Header>
|
|
|
+ <Grid>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition/>
|
|
|
+ <ColumnDefinition SharedSizeGroup="Sample"/>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <TextBlock Text="Red"
|
|
|
+ VerticalAlignment="Center"/>
|
|
|
+ <Border Classes="Sample" Background="Red"/>
|
|
|
+ </Grid>
|
|
|
+ </MenuItem.Header>
|
|
|
+ <MenuItem.Icon>
|
|
|
+ <Border CornerRadius="8"
|
|
|
+ Width="16"
|
|
|
+ Height="16"
|
|
|
+ BorderBrush="{DynamicResource ThemeBorderHighBrush}"
|
|
|
+ BorderThickness="1"
|
|
|
+ >
|
|
|
+ <Border Background="{Binding FocusHighlighter,Converter={StaticResource bsc},ConverterParameter={x:Static Brushes.Red}}"
|
|
|
+ Margin="2"
|
|
|
+ CornerRadius="6"/>
|
|
|
+ </Border>
|
|
|
+ </MenuItem.Icon>
|
|
|
+ </MenuItem>
|
|
|
+ <!-- Blue -->
|
|
|
+ <MenuItem Command="{Binding SelectFocusHighlighter}"
|
|
|
+ CommandParameter="{x:Static Brushes.Blue}">
|
|
|
+ <MenuItem.Header>
|
|
|
+ <Grid>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition/>
|
|
|
+ <ColumnDefinition SharedSizeGroup="Sample"/>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <TextBlock Text="Blue"
|
|
|
+ VerticalAlignment="Center"/>
|
|
|
+ <Border Classes="Sample" Background="Blue"/>
|
|
|
+ </Grid>
|
|
|
+ </MenuItem.Header>
|
|
|
+ <MenuItem.Icon>
|
|
|
+ <Border CornerRadius="8"
|
|
|
+ Width="16"
|
|
|
+ Height="16"
|
|
|
+ BorderBrush="{DynamicResource ThemeBorderHighBrush}"
|
|
|
+ BorderThickness="1"
|
|
|
+ >
|
|
|
+ <Border Background="{Binding FocusHighlighter,Converter={StaticResource bsc},ConverterParameter={x:Static Brushes.Blue}}"
|
|
|
+ Margin="2"
|
|
|
+ CornerRadius="6"/>
|
|
|
+ </Border>
|
|
|
+ </MenuItem.Icon>
|
|
|
+ </MenuItem>
|
|
|
+ <!-- Black -->
|
|
|
+ <MenuItem Command="{Binding SelectFocusHighlighter}"
|
|
|
+ CommandParameter="{x:Static Brushes.Black}">
|
|
|
+ <MenuItem.Header>
|
|
|
+ <Grid>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition/>
|
|
|
+ <ColumnDefinition SharedSizeGroup="Sample"/>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <TextBlock Text="Black"
|
|
|
+ VerticalAlignment="Center"/>
|
|
|
+ <Border Classes="Sample" Background="Black"/>
|
|
|
+ </Grid>
|
|
|
+ </MenuItem.Header>
|
|
|
+ <MenuItem.Icon>
|
|
|
+ <Border CornerRadius="8"
|
|
|
+ Width="16"
|
|
|
+ Height="16"
|
|
|
+ BorderBrush="{DynamicResource ThemeBorderHighBrush}"
|
|
|
+ BorderThickness="1"
|
|
|
+ >
|
|
|
+ <Border Background="{Binding FocusHighlighter,Converter={StaticResource bsc},ConverterParameter={x:Static Brushes.Black}}"
|
|
|
+ Margin="2"
|
|
|
+ CornerRadius="6"/>
|
|
|
+ </Border>
|
|
|
+ </MenuItem.Icon>
|
|
|
+ </MenuItem>
|
|
|
+ <!-- White -->
|
|
|
+ <MenuItem Command="{Binding SelectFocusHighlighter}"
|
|
|
+ CommandParameter="{x:Static Brushes.White}">
|
|
|
+ <MenuItem.Header>
|
|
|
+ <Grid>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition/>
|
|
|
+ <ColumnDefinition SharedSizeGroup="Sample"/>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+ <TextBlock Text="White"
|
|
|
+ VerticalAlignment="Center"/>
|
|
|
+ <Border Classes="Sample" Background="White"/>
|
|
|
+ </Grid>
|
|
|
+ </MenuItem.Header>
|
|
|
+ <MenuItem.Icon>
|
|
|
+ <Border CornerRadius="8"
|
|
|
+ Width="16"
|
|
|
+ Height="16"
|
|
|
+ BorderBrush="{DynamicResource ThemeBorderHighBrush}"
|
|
|
+ BorderThickness="1"
|
|
|
+ >
|
|
|
+ <Border Background="{Binding FocusHighlighter,Converter={StaticResource bsc},ConverterParameter={x:Static Brushes.White}}"
|
|
|
+ Margin="2"
|
|
|
+ CornerRadius="6"/>
|
|
|
+ </Border>
|
|
|
+ </MenuItem.Icon>
|
|
|
+ </MenuItem>
|
|
|
+ </MenuItem.Items>
|
|
|
+ </MenuItem>
|
|
|
</MenuItem>
|
|
|
</Menu>
|
|
|
|