wpf-demos/smithchart/Views/Customization.xaml

181 строка
7.7 KiB
XML

<democommon:DemoControl
x:Class="syncfusion.smithchartdemos.wpf.Customization"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:SmithChart="clr-namespace:Syncfusion.UI.Xaml.SmithChart;assembly=Syncfusion.SfSmithChart.WPF"
xmlns:controls="clr-namespace:Syncfusion.Windows.Tools.Controls;assembly=Syncfusion.Shared.Wpf"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:democommon="clr-namespace:syncfusion.demoscommon.wpf;assembly=syncfusion.demoscommon.wpf"
xmlns:local="clr-namespace:syncfusion.smithchartdemos.wpf"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Width="auto"
Height="auto"
OptionsPosition="Right"
OptionsSize="Auto"
mc:Ignorable="d">
<democommon:DemoControl.DataContext>
<local:CustomizationViewModel />
</democommon:DemoControl.DataContext>
<democommon:DemoControl.Resources>
<democommon:EnumDisplayNameConverter x:Key="EnumDisplayNameConverter" />
</democommon:DemoControl.Resources>
<Grid x:Name="Grid">
<SmithChart:SfSmithChart x:Name="SmithChart" Header="Impedance Transmission" MinHeight="250" MinWidth="250">
<SmithChart:SfSmithChart.Series>
<SmithChart:LineSeries
EnableAnimation="False"
ItemsSource="{Binding Trace1}"
Label="Transmission 1"
ReactancePath="Reactance"
ResistancePath="Resistance"
ShowMarker="True"
ShowToolTip="True">
<SmithChart:LineSeries.DataLabel>
<SmithChart:DataLabel ShowLabel="False" />
</SmithChart:LineSeries.DataLabel>
</SmithChart:LineSeries>
<SmithChart:LineSeries
EnableAnimation="False"
ItemsSource="{Binding Trace2}"
Label="Transmission 2"
ReactancePath="Reactance"
ResistancePath="Resistance"
ShowMarker="True"
ShowToolTip="True" />
</SmithChart:SfSmithChart.Series>
<SmithChart:SfSmithChart.HorizontalAxis>
<SmithChart:HorizontalAxis x:Name="horizontalAxis" ShowMinorGridlines="True" />
</SmithChart:SfSmithChart.HorizontalAxis>
<SmithChart:SfSmithChart.RadialAxis>
<SmithChart:RadialAxis x:Name="radialAxis" ShowMinorGridlines="True" />
</SmithChart:SfSmithChart.RadialAxis>
<SmithChart:SfSmithChart.Legend>
<SmithChart:SmithChartLegend DockPosition="{Binding SelectedItem, ElementName=legendPosition, Mode=TwoWay}" LegendIcon="HorizontalLine" />
</SmithChart:SfSmithChart.Legend>
</SmithChart:SfSmithChart>
</Grid>
<democommon:DemoControl.Options>
<StackPanel
Margin="5,15,5,5"
HorizontalAlignment="Left"
VerticalAlignment="Top">
<Grid Margin="0,15,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock
Margin="3,5,3,3"
FontSize="13"
Text="Palette" />
<controls:ComboBoxAdv
x:Name="paletteCombo"
Grid.Column="1"
Width="145"
Height="30"
HorizontalAlignment="Left"
FontSize="13"
ItemsSource="{democommon:EnumValuesExtension Type=SmithChart:ColorPalette}"
SelectedIndex="1"
SelectedItem="{Binding ElementName=SmithChart, Path=ColorModel.Palette, Mode=TwoWay}">
<controls:ComboBoxAdv.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource EnumDisplayNameConverter}}" />
</DataTemplate>
</controls:ComboBoxAdv.ItemTemplate>
</controls:ComboBoxAdv>
</Grid>
<Grid Margin="0,15,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock
Margin="5"
FontSize="13"
Text="Circle Radius" />
<Slider
x:Name="radius"
Grid.Column="1"
Width="145"
HorizontalAlignment="Left"
Maximum="1"
Minimum="0.1"
IsMoveToPointEnabled="True"
Value="{Binding ElementName=SmithChart, Mode=TwoWay, Path=Radius}" />
</Grid>
<Grid Margin="0,15,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock
Margin="5"
FontSize="13"
Text="Legend Position" />
<controls:ComboBoxAdv
x:Name="legendPosition"
Grid.Column="1"
Width="145"
Height="30"
HorizontalAlignment="Left"
FontSize="13"
ItemsSource="{democommon:EnumValuesExtension Type=SmithChart:ChartDock}"
SelectedIndex="2">
<controls:ComboBoxAdv.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Converter={StaticResource EnumDisplayNameConverter}}" />
</DataTemplate>
</controls:ComboBoxAdv.ItemTemplate>
</controls:ComboBoxAdv>
</Grid>
<Grid Margin="0,15,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock
Margin="5"
VerticalAlignment="Top"
FontSize="13"
Text="Horizontal Axis Minor Gridlines" />
<CheckBox
x:Name="showHrzMinorGridLines"
Grid.Column="1"
Width="145"
Height="30"
HorizontalAlignment="Left"
VerticalAlignment="Center"
IsChecked="{Binding ElementName=horizontalAxis, Path=ShowMinorGridlines}" />
</Grid>
<Grid Margin="0,15,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock
Margin="5"
VerticalAlignment="Top"
FontSize="13"
Text="Radial Axis Minor Gridlines" />
<CheckBox
x:Name="showRdlMinorGridLines"
Grid.Column="1"
Width="145"
Height="30"
HorizontalAlignment="Left"
VerticalAlignment="Center"
IsChecked="{Binding ElementName=radialAxis, Path=ShowMinorGridlines}" />
</Grid>
</StackPanel>
</democommon:DemoControl.Options>
</democommon:DemoControl>