feat: inherit font properties.

This commit is contained in:
rabbitism
2024-02-17 15:53:42 +08:00
parent e7b99842bc
commit 40454bcfe0
3 changed files with 56 additions and 31 deletions

View File

@@ -1,17 +1,23 @@
<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:u="https://irihi.tech/ursa"
xmlns:vm="using:Ursa.Demo.ViewModels"
x:DataType="vm:NumberDisplayerDemoViewModel"
x:CompileBindings="True"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Ursa.Demo.Pages.NumberDisplayerDemo">
<UserControl
x:Class="Ursa.Demo.Pages.NumberDisplayerDemo"
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:u="https://irihi.tech/ursa"
xmlns:vm="using:Ursa.Demo.ViewModels"
d:DesignHeight="450"
d:DesignWidth="800"
x:CompileBindings="True"
x:DataType="vm:NumberDisplayerDemoViewModel"
mc:Ignorable="d">
<StackPanel HorizontalAlignment="Left">
<Button Command="{Binding IncreaseCommand}" >Change</Button>
<u:Int32Displayer Value="{Binding Value}"></u:Int32Displayer>
<u:DoubleDisplayer Value="{Binding DoubleValue}" StringFormat="N2"></u:DoubleDisplayer>
<u:DateDisplay Value="{Binding DateValue}" StringFormat="yyyy-MM-dd"></u:DateDisplay>
<Button Command="{Binding IncreaseCommand}">Change</Button>
<u:Int32Displayer Value="{Binding Value}" />
<u:DoubleDisplayer StringFormat="N2" Value="{Binding DoubleValue}" />
<u:DateDisplay
FontSize="30"
StringFormat="yyyy-MM-dd"
Value="{Binding DateValue}" />
</StackPanel>
</UserControl>