Files
StockSharp/Samples/Chart/SampleChart/MainWindow.xaml
T

65 lines
3.6 KiB
XML

<dx:ThemedWindow x:Class="SampleChart.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sx="http://schemas.stocksharp.com/xaml"
xmlns:loc="clr-namespace:StockSharp.Localization;assembly=StockSharp.Localization"
xmlns:xaml="clr-namespace:Ecng.Xaml;assembly=Ecng.Xaml"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:devExp="clr-namespace:Ecng.Xaml.DevExp;assembly=Ecng.Xaml.DevExp"
Title="{x:Static loc:LocalizedStrings.XamlStr540}" Height="500" Width="1000">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<WrapPanel Orientation="Horizontal">
<GroupBox Padding="5" VerticalAlignment="Center">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{x:Static loc:LocalizedStrings.Str1242}" VerticalAlignment="Center"/>
<sx:CandleSettingsEditor x:Name="SeriesEditor" Margin="3,0" />
<CheckBox x:Name="BuildFromTicks" Content="Build from ticks" IsChecked="True" VerticalAlignment="Center"/>
<devExp:FolderBrowserPicker x:Name="HistoryPath" Width="250" Margin="10,0,10,0" FolderChanged="HistoryPath_OnFolderChanged" />
<ComboBox x:Name="Securities" Width="150" SelectionChanged="Securities_OnSelectionChanged" />
<sx:StorageFormatComboBox x:Name="Format" Margin="10,0,0,0"/>
<Button x:Name="Draw" Content="{x:Static loc:LocalizedStrings.Str3200}" Margin="10,0,10,0" IsEnabled="False" Click="Draw_Click"/>
</StackPanel>
</GroupBox>
<ComboBox Margin="5,0,0,0" x:Name="Theme" SelectionChanged="OnThemeSelectionChanged" VerticalAlignment="Center" Width="100">
<ComboBoxItem Content="{x:Static dx:Theme.Office2016BlackName}"/>
<ComboBoxItem Content="{x:Static dx:Theme.Office2016WhiteName}"/>
<ComboBoxItem Content="{x:Static dx:Theme.MetropolisDarkName}"/>
<ComboBoxItem Content="{x:Static dx:Theme.MetropolisLightName}"/>
</ComboBox>
<GroupBox Margin="0" Padding="0" VerticalAlignment="Center">
<StackPanel Orientation="Vertical">
<CheckBox Content="{x:Static loc:LocalizedStrings.RealTime}" Margin="3,0,0,0" x:Name="IsRealtime" VerticalAlignment="Center" Checked="IsRealtime_OnChecked" Unchecked="IsRealtime_OnChecked" />
<CheckBox Content="{x:Static loc:LocalizedStrings.CustomColors}" Margin="3,0,0,0" x:Name="CustomColors" Checked="CustomColors_Changed" Unchecked="CustomColors_Changed" VerticalAlignment="Center"/>
<CheckBox Margin="3,0,0,0" x:Name="CustomColors2" Checked="CustomColors2_Changed" Unchecked="CustomColors2_Changed" VerticalAlignment="Center">
<CheckBox.Content>
<TextBlock><Run Text="{x:Static loc:LocalizedStrings.CustomColors}"/><Run Text="2"/></TextBlock>
</CheckBox.Content>
</CheckBox>
</StackPanel>
</GroupBox>
<xaml:TimeZoneComboBox Margin="5,0,0,0" SelectedTimeZone="{Binding TimeZone, Mode=TwoWay, ElementName=Chart}" HorizontalAlignment="Stretch" VerticalAlignment="Center" Width="100" ToolTip="Chart time zone"/>
<GroupBox Header="Annotations" Margin="3,2" Padding="0">
<StackPanel Orientation="Horizontal">
<Button x:Name="NewAnnotationBtn" Content="new" Margin="4,0" IsEnabled="False" Click="NewAnnotation_Click" ToolTip="Create new annotation from code" VerticalAlignment="Center"/>
<Button x:Name="ModifyAnnotationBtn" Content="modify" Margin="4,0" IsEnabled="False" Click="ModifyAnnotation_Click" ToolTip="Modify annotation from code" VerticalAlignment="Center"/>
</StackPanel>
</GroupBox>
</WrapPanel>
<sx:ChartPanel x:Name="Chart" IsInteracted="True" Grid.Row="1"/>
</Grid>
</dx:ThemedWindow>