forked from CommunityToolkit/Windows
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDoubleToObjectConverterSample.xaml
More file actions
24 lines (22 loc) · 1.35 KB
/
DoubleToObjectConverterSample.xaml
File metadata and controls
24 lines (22 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<Page x:Class="ConvertersExperiment.Samples.DoubleToObjectConverterSample"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="using:CommunityToolkit.WinUI.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:ConvertersExperiment.Samples"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Page.Resources>
<converters:DoubleToObjectConverter x:Key="DoubleToObjectConverter"
FalseValue="{ThemeResource SystemFillColorSuccessBrush}"
GreaterThan="3"
LessThan="7"
TrueValue="{ThemeResource SystemFillColorCriticalBrush}" />
</Page.Resources>
<Border Width="64"
Height="64"
HorizontalAlignment="Left"
Background="{x:Bind NumericValue, Mode=OneWay, Converter={StaticResource DoubleToObjectConverter}}"
CornerRadius="4" />
</Page>