153 lines
6.1 KiB
XML
153 lines
6.1 KiB
XML
<UserControl
|
|
x:Class="mbts.ui.controls.VolSurfaceMacroControlView"
|
|
x:ClassModifier="internal"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
|
xmlns:u="clr-namespace:mbts.ui"
|
|
xmlns:controls="clr-namespace:mbts.ui.controls"
|
|
xmlns:c="clr-namespace:mbts.ui.controls"
|
|
xmlns:converters="clr-namespace:mbts.ui.converters">
|
|
<UserControl.Resources>
|
|
<sys:Double x:Key="PanelItem.VerticalSeparation">5</sys:Double>
|
|
<sys:Double x:Key="PanelItem.HorizontalSeparation">5</sys:Double>
|
|
<Thickness
|
|
x:Key="PanelItem.MarginT" Left="0" Top="{StaticResource PanelItem.VerticalSeparation}" />
|
|
|
|
<Style x:Key="PanelItem" TargetType="Control">
|
|
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
|
<Setter Property="Margin" Value="{StaticResource PanelItem.MarginT}" />
|
|
</Style>
|
|
|
|
<Style x:Key="PanelItem.TextBlock" TargetType="TextBlock">
|
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
|
<Setter Property="Margin" Value="{StaticResource PanelItem.MarginT}" />
|
|
<Setter Property="Foreground" Value="{u:BTSBrush UI.default_text}" />
|
|
</Style>
|
|
|
|
<Style x:Key="PanelItem.Button" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
|
|
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
|
<Setter Property="Margin" Value="{StaticResource PanelItem.MarginT}" />
|
|
</Style>
|
|
|
|
<Style
|
|
x:Key="PanelItem.CheckBox" TargetType="CheckBox" BasedOn="{StaticResource {x:Type CheckBox}}">
|
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
|
<Setter Property="Margin" Value="{StaticResource PanelItem.MarginT}" />
|
|
</Style>
|
|
|
|
<Style
|
|
x:Key="PanelItem.ComboBox" TargetType="ComboBox" BasedOn="{StaticResource {x:Type ComboBox}}">
|
|
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
|
<Setter Property="Margin" Value="{StaticResource PanelItem.MarginT}" />
|
|
</Style>
|
|
|
|
<Style x:Key="PanelItem.TickUpDown.Parameterless" TargetType="c:TickUpDown" BasedOn="{StaticResource {x:Type c:TickUpDown}}">
|
|
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
|
<Setter Property="Margin" Value="{StaticResource PanelItem.MarginT}" />
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="Foreground" Value="{u:BTSBrush UI.default_text}" />
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
<Setter Property="TickUpCommandParameter" Value="{u:True}" />
|
|
<Setter Property="TickDownCommandParameter" Value="{u:False}" />
|
|
</Style>
|
|
</UserControl.Resources>
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
|
<StackPanel>
|
|
<StackPanel Orientation="Horizontal">
|
|
<CheckBox
|
|
Margin="0"
|
|
IsChecked="{Binding cascade_up}"
|
|
IsEnabled="{Binding can_cascade}"
|
|
Content="Up"
|
|
ToolTip="Cascade Up"
|
|
Style="{StaticResource PanelItem.CheckBox}" />
|
|
<CheckBox
|
|
IsChecked="{Binding cascade_down}"
|
|
IsEnabled="{Binding can_cascade}"
|
|
Content="Down"
|
|
ToolTip="Cascade Down"
|
|
Style="{StaticResource PanelItem.CheckBox}">
|
|
<CheckBox.Margin>
|
|
<Thickness Left="{StaticResource PanelItem.HorizontalSeparation}" />
|
|
</CheckBox.Margin>
|
|
</CheckBox>
|
|
</StackPanel>
|
|
|
|
<Button
|
|
Command="{Binding rebuild}" Content="Rebuild" Style="{StaticResource PanelItem.Button}" />
|
|
|
|
<c:TickUpDown
|
|
TickCommand="{Binding put_rotation}"
|
|
Content="Put Rotation"
|
|
Style="{StaticResource PanelItem.TickUpDown.Parameterless}" />
|
|
|
|
<c:TickUpDown
|
|
TickCommand="{Binding call_rotation}"
|
|
Content="Call Rotation"
|
|
Style="{StaticResource PanelItem.TickUpDown.Parameterless}" />
|
|
|
|
<c:TickUpDown
|
|
TickCommand="{Binding full_rotation}"
|
|
Content="Risk Reversal"
|
|
Style="{StaticResource PanelItem.TickUpDown.Parameterless}" />
|
|
|
|
<c:TickUpDown
|
|
TickCommand="{Binding strangle}"
|
|
Content="Strangle"
|
|
Style="{StaticResource PanelItem.TickUpDown.Parameterless}" />
|
|
|
|
<c:TickUpDown
|
|
Grid.Row="1"
|
|
TickCommand="{Binding atm_shift}"
|
|
Content="ATM Move"
|
|
Style="{StaticResource PanelItem.TickUpDown.Parameterless}" />
|
|
|
|
<TextBlock
|
|
Text="Fit to Market"
|
|
Style="{StaticResource PanelItem.TextBlock}" />
|
|
<StackPanel VerticalAlignment="Top" Margin="0,5,0,0">
|
|
<ComboBox
|
|
x:Name="_a"
|
|
SelectedIndex="0"
|
|
IsEnabled="False"
|
|
Style="{StaticResource PanelItem.ComboBox}">
|
|
<ComboBoxItem Style="{StaticResource ComboBoxItem.Dark}">Live</ComboBoxItem>
|
|
<ComboBoxItem Style="{StaticResource ComboBoxItem.Dark}">Settlement</ComboBoxItem>
|
|
</ComboBox>
|
|
<ComboBox
|
|
x:Name="_b"
|
|
SelectedIndex="0"
|
|
IsEnabled="{Binding can_execute_commands}"
|
|
Style="{StaticResource PanelItem.ComboBox}">
|
|
<ComboBoxItem>ATM Only</ComboBoxItem>
|
|
<ComboBoxItem>All</ComboBoxItem>
|
|
</ComboBox>
|
|
<CheckBox
|
|
IsChecked="{Binding use_weighted_regression_fit}"
|
|
Content="Weight Reg. Fit"
|
|
Style="{StaticResource PanelItem.CheckBox}" />
|
|
<Button
|
|
Command="{Binding fit_to_market}"
|
|
Content="Fit"
|
|
Style="{StaticResource PanelItem.Button}">
|
|
<Button.CommandParameter>
|
|
<MultiBinding Converter="{StaticResource TupleConverter}">
|
|
<Binding ElementName="_a" Path="SelectedIndex" />
|
|
<Binding ElementName="_b" Path="SelectedIndex" />
|
|
</MultiBinding>
|
|
</Button.CommandParameter>
|
|
</Button>
|
|
</StackPanel>
|
|
|
|
<c:TickUpDown
|
|
TickCommand="{Binding vol_shift}"
|
|
Visibility="Collapsed"
|
|
Content="Global Vol Shift"
|
|
Style="{StaticResource PanelItem.TickUpDown.Parameterless}" />
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</UserControl>
|