Exchanges

Screenshot: exchange reference

ExchangesPanel - an exchange reference. It shows the list of Exchange items with the name and the country and allows adding your own exchanges.

Main properties

The panel usually goes together with ExchangeBoardsPanel: the exchange selected here defines which boards are shown there. The SelectedExchangeChanged event reports the change of selection.

Below are code snippets showing its usage:

<Window x:Class="Sample.ExchangesWindow"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:xaml="http://schemas.stocksharp.com/xaml"
	Height="400" Width="600">
	<xaml:ExchangesPanel x:Name="ExchangesPanel" />
</Window>
// Select the exchange
ExchangesPanel.SetExchange(Exchange.Moex.Name);

// Reset the board selection when the exchange changes
ExchangesPanel.SelectedExchangeChanged += () =>
	BoardsPanel.SetBoardCode(null);

// Save the reference
foreach (var exchange in ExchangesPanel.Exchanges)
	_exchangeInfoProvider.Save(exchange);

See also

Service panels