mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-07 09:46:37 +08:00
27 lines
1.5 KiB
XML
27 lines
1.5 KiB
XML
<UserControl x:Class="Wpf.Gauges.AngularGaugeExmple"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:Wpf.Gauges"
|
|
xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="300" d:DesignWidth="300" d:DataContext="{d:DesignInstance local:AngularGaugeExmple}">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"></RowDefinition>
|
|
<RowDefinition Height="*"></RowDefinition>
|
|
</Grid.RowDefinitions>
|
|
<Button Margin="10" Click="ChangeValueOnClick">Update</Button>
|
|
<lvc:AngularGauge Grid.Row="1" Value="{Binding Value}" FromValue="50" ToValue="250"
|
|
LabelsStep="50" TicksStep="25" Wedge="300"
|
|
TicksForeground="White" Foreground="White"
|
|
FontWeight="Bold" FontSize="16"
|
|
SectionsInnerRadius=".5">
|
|
<lvc:AngularGauge.Sections>
|
|
<lvc:AngularSection FromValue="50" ToValue="200" Fill="#F8A725"/>
|
|
<lvc:AngularSection FromValue="200" ToValue="250" Fill="#FF3939"/>
|
|
</lvc:AngularGauge.Sections>
|
|
</lvc:AngularGauge>
|
|
</Grid>
|
|
</UserControl> |