<!-- MainWindow.axaml -->
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:LoudnessMeter.ViewModels"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="clr-namespace:LoudnessMeter.Views.TemplatedControls;assembly=LoudnessMeter"
mc:Ignorable="d" d:DesignWidth="1048" d:DesignHeight="630"
Width="1048" Height="630"
x:Class="LoudnessMeter.Views.MainWindow"
x:DataType="vm:MainWindowViewModel"
Title="Loudness Meter">
<Design.DataContext>
<vm:MainWindowViewModel/>
</Design.DataContext>
<Grid>
<Grid>
<StackPanel>
<controls:LargeLabelControl />
</StackPanel>
</Grid>
</Grid>
</Window>
<!-- ./Views/TemplatedControls/LargeLabelControl.axaml -->
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:LoudnessMeter.Views.TemplatedControls">
<Design.PreviewWith>
<StackPanel>
<StackPanel Background="{DynamicResource SystemRegionBrush}">
<controls:LargeLabelControl />
</StackPanel>
</StackPanel>
</Design.PreviewWith>
<ControlTheme x:Key="{x:Type controls:LargeLabelControl}" TargetType="controls:LargeLabelControl">
<Setter Property="Foreground" Value="White" />
<Setter Property="Background" Value="{DynamicResource MidBlueBrush}" />
<Setter Property="Template">
<ControlTemplate>
<Border Padding="15, 7" Background="{DynamicResource MidBlueBrush}">
<StackPanel>
<Label HorizontalAlignment="Center" Padding="0" FontSize="21" Content="-31.3 LUFS" />
<Label HorizontalAlignment="Center" Padding="0" FontSize="11" Content="SHORT TERM" />
</StackPanel>
</Border>
</ControlTemplate>
</Setter>
</ControlTheme>
</ResourceDictionary>
<!-- MainWindow.axaml -->
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="using:LoudnessMeter.ViewModels"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="clr-namespace:LoudnessMeter.Views.TemplatedControls;assembly=LoudnessMeter"
mc:Ignorable="d" d:DesignWidth="1048" d:DesignHeight="630"
Width="1048" Height="630"
x:Class="LoudnessMeter.Views.MainWindow"
x:DataType="vm:MainWindowViewModel"
Title="Loudness Meter">
<Design.DataContext>
<vm:MainWindowViewModel/>
</Design.DataContext>
<Grid>
<Grid>
<StackPanel>
<controls:LargeLabelControl />
</StackPanel>
</Grid>
</Grid>
</Window>
<!-- ./Views/TemplatedControls/LargeLabelControl.axaml -->
<ResourceDictionary xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:LoudnessMeter.Views.TemplatedControls">
<Design.PreviewWith>
<StackPanel>
<StackPanel Background="{DynamicResource SystemRegionBrush}">
<controls:LargeLabelControl />
</StackPanel>
</StackPanel>
</Design.PreviewWith>
<ControlTheme x:Key="{x:Type controls:LargeLabelControl}" TargetType="controls:LargeLabelControl">
<Setter Property="Foreground" Value="White" />
<Setter Property="Background" Value="{DynamicResource MidBlueBrush}" />
<Setter Property="Template">
<ControlTemplate>
<Border Padding="15, 7" Background="{DynamicResource MidBlueBrush}">
<StackPanel>
<Label HorizontalAlignment="Center" Padding="0" FontSize="21" Content="-31.3 LUFS" />
<Label HorizontalAlignment="Center" Padding="0" FontSize="11" Content="SHORT TERM" />
</StackPanel>
</Border>
</ControlTemplate>
</Setter>
</ControlTheme>
</ResourceDictionary>