iWOWS/WolfOfWallStreet/Views/Controllers/SymbolsController.xaml

58 lines
2.3 KiB
XML

<UserControl
x:Class="WolfOfWallStreet.Views.Controllers.SymbolsController"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:prism="http://prismlibrary.com/"
prism:ViewModelLocator.AutoWireViewModel="True"
FlowDirection="RightToLeft">
<Grid Margin="10,0">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBox
Margin="0,10"
hc:InfoElement.Placeholder="Name"
Style="{StaticResource TextBoxExtend}"
Text="{Binding Path=Symbol.SymbolName, Mode=OneWayToSource}" />
<TextBox
Grid.Column="1"
Margin="10,10"
hc:InfoElement.Placeholder="Isin"
Style="{StaticResource TextBoxExtend}"
Text="{Binding Path=Symbol.symbolISIN, Mode=OneWayToSource}" />
<Button
Grid.Column="2"
Padding="10,0"
Command="{Binding AddSymbolCommand}"
Content="+"
FontSize="18"
Style="{StaticResource ButtonSuccess}" />
</Grid>
<ItemsControl Grid.Row="1" ItemsSource="{Binding Symbols}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<hc:Tag
Margin="4,4"
Closed="SymbolTag_OnClosed"
Content="{Binding SymbolName}"
Selectable="False"
ShowCloseButton="True" />
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
</UserControl>