feat: add option to make it selectable.

This commit is contained in:
rabbitism
2024-02-18 18:21:49 +08:00
parent a4c214cfc2
commit 728185bdf7
3 changed files with 33 additions and 2 deletions

View File

@@ -16,9 +16,23 @@
FontWeight="{TemplateBinding FontWeight}"
FontStyle="{TemplateBinding FontSize}"
FontStretch="{TemplateBinding FontStretch}"
Text="{TemplateBinding InternalText,
Mode=OneWay}" />
Text="{TemplateBinding InternalText, Mode=OneWay}" />
</ControlTemplate>
</Setter>
<Style Selector="^[IsSelectable=True]">
<Setter Property="Template">
<ControlTemplate TargetType="u:NumberDisplayerBase">
<SelectableTextBlock
FontSize="{TemplateBinding FontSize}"
Foreground="{TemplateBinding Foreground}"
FontFamily="{TemplateBinding FontFamily}"
Background="{TemplateBinding Background}"
FontWeight="{TemplateBinding FontWeight}"
FontStyle="{TemplateBinding FontSize}"
FontStretch="{TemplateBinding FontStretch}"
Text="{TemplateBinding InternalText, Mode=OneWay}" />
</ControlTemplate>
</Setter>
</Style>
</ControlTheme>
</ResourceDictionary>