Default ChartObject Template |
A Chart Object implements the ITemplate interface and supports Xaml templates so that user can edit the properties from the supported views (double click on the chart object to bring the properties view).
xmlns:bControls="clr-namespace:SharpCharts.Base.Controls;assembly=SharpCharts.Base" xmlns:bCommon="clr-namespace:SharpCharts.Base.Common;assembly=SharpCharts.Base" xmlns:bOrder="clr-namespace:SharpCharts.Base.Order;assembly=SharpCharts.Base" xmlns:bData="clr-namespace:SharpCharts.Base.Data;assembly=SharpCharts.Base"
<DataTemplate x:Key="{x:Static bCommon:ResourceKey.DefaultChartObjectTemplate}"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="0.5*"/> <ColumnDefinition /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <TextBlock Text="{Loc LblWidth}" Margin="3" FlowDirection="RightToLeft" VerticalAlignment="Center" FontWeight="SemiBold" /> <TextBlock Grid.Row="1" Text="{Loc LblBrush}" Margin="3" FlowDirection="RightToLeft" VerticalAlignment="Center" FontWeight="SemiBold" /> <bControls:DoubleUpDown Grid.Column="1" Value="{Binding LineWidth}" Increment="1" Minimum="1" Margin="3" /> <ComboBox Grid.Row="1" Grid.Column="1" ItemsSource="{Binding Source={StaticResource {x:Static bCommon:ResourceKey.BrushListKey}}}" SelectedValue="{Binding Brush, Converter={StaticResource ResourceKey={x:Static bCommon:ResourceKey.BrushConverterKey}}}" SelectedValuePath="Brush" Margin="3" /> </Grid> </DataTemplate>