Click or drag to resize

PropertyGridEx

PropertyGridEx - the table for editing object properties. The component includes a set of additional editors for system types and S# types.

PropertyGridEx has its own editors for the following types:

Main properties

  • SecurityProvider - the provider of information about instruments.

  • ExchangeInfoProvider - the provider of site information.

  • Portfolios - the list of available portfolios.

  • SelectedObject - the object whose properties will be displayed in the table.

Below is the appearance of the component, as well as code snippets with its use. The code example is taken from Samples/Fix/SampleFix.

GUI Property Data Grid Ex
XAML
<Window x:Class="SampleFix.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:loc="clr-namespace:StockSharp.Localization;assembly=StockSharp.Localization"
    xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
        xmlns:propertyGrid="http://schemas.stocksharp.com/xaml"
        Title="{x:Static loc:LocalizedStrings.XamlStr540}" Height="110" Width="512">
  <Grid>
    <Grid.ColumnDefinitions>
      <ColumnDefinition />
      <ColumnDefinition />
      <ColumnDefinition />
      <ColumnDefinition />
      <ColumnDefinition />
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
      <RowDefinition Height="24" />
      <RowDefinition Height="Auto" />
      <RowDefinition Height="Auto" />
    </Grid.RowDefinitions>

    <StackPanel Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="5" Orientation="Horizontal">
      <xctk:DropDownButton Content="{x:Static loc:LocalizedStrings.TransactionalSession}">
        <xctk:DropDownButton.DropDownContent>
          <propertyGrid:PropertyGridEx x:Name="TransactionSessionSettings" />
        </xctk:DropDownButton.DropDownContent>
      </xctk:DropDownButton>

      <xctk:DropDownButton Content="{x:Static loc:LocalizedStrings.MarketDataSession}">
        <xctk:DropDownButton.DropDownContent>
          <propertyGrid:PropertyGridEx x:Name="MarketDataSessionSettings" />
        </xctk:DropDownButton.DropDownContent>
      </xctk:DropDownButton>
    </StackPanel>

    <Button x:Name="ConnectBtn" Background="LightPink" Grid.Column="0" Grid.Row="1" Grid.RowSpan="2" Content="{x:Static loc:LocalizedStrings.Connect}" Click="ConnectClick" />
    <Button x:Name="ShowSecurities" Grid.Column="1" Grid.Row="1" IsEnabled="False" Content="{x:Static loc:LocalizedStrings.Securities}" Click="ShowSecuritiesClick" />
    <Button x:Name="ShowPortfolios" Grid.Column="2" Grid.Row="1" IsEnabled="False" Content="{x:Static loc:LocalizedStrings.Portfolios}" Click="ShowPortfoliosClick" />
    <Button x:Name="ShowStopOrders" Grid.Column="3" Grid.Row="1" IsEnabled="False" Content="{x:Static loc:LocalizedStrings.StopOrders}" Click="ShowStopOrdersClick" />
    <Button x:Name="ShowNews" Grid.Column="4" Grid.Row="1" IsEnabled="False" Content="{x:Static loc:LocalizedStrings.News}" Click="ShowNewsClick" />

    <Button x:Name="ShowTrades" Grid.Column="1" Grid.Row="2" IsEnabled="False" Content="{x:Static loc:LocalizedStrings.Ticks}" Click="ShowTradesClick" />
    <Button x:Name="ShowMyTrades" Grid.Column="2" Grid.Row="2" IsEnabled="False" Content="{x:Static loc:LocalizedStrings.MyTrades}" Click="ShowMyTradesClick" />
    <Button x:Name="ShowOrders" Grid.Column="3" Grid.Row="2" IsEnabled="False" Content="{x:Static loc:LocalizedStrings.Orders}" Click="ShowOrdersClick" />
  </Grid>
</Window>
C#
public MainWindow()
{
    InitializeComponent();

    Title = Title.Put("FIX");

    _ordersWindow.MakeHideable();
    _myTradesWindow.MakeHideable();
    _tradesWindow.MakeHideable();
    _securitiesWindow.MakeHideable();
    _stopOrdersWindow.MakeHideable();
    _portfoliosWindow.MakeHideable();
    _newsWindow.MakeHideable();

    if (File.Exists(_settingsFile))
    {
        Trader.Load(new XmlSerializer<SettingsStorage>().Deserialize(_settingsFile));
    }

    MarketDataSessionSettings.SelectedObject = ((ChannelMessageAdapter)Trader.MarketDataAdapter).InnerAdapter;
    TransactionSessionSettings.SelectedObject = ((ChannelMessageAdapter)Trader.TransactionAdapter).InnerAdapter;

    Instance = this;

    Trader.LogLevel = LogLevels.Debug;

    _logManager.Sources.Add(Trader);
    _logManager.Listeners.Add(new FileLogListener { LogDirectory = "StockSharp_Fix" });
}