Files
OemanTrader/OemanTrader.WPF/Controls/MajorIndexCard.xaml
2022-05-26 15:19:31 +02:00

33 lines
1.9 KiB
XML

<UserControl x:Class="OemanTrader.WPF.Controls.MajorIndexCard"
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:local="clr-namespace:OemanTrader.WPF.Controls"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Border BorderBrush="LightGray" BorderThickness="1" CornerRadius="10">
<Grid Margin="10" >
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Text="{Binding Type, FallbackValue=Name}" FontSize="18" HorizontalAlignment="Center" />
<Grid Grid.Row="1" Margin="0 10">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Row="0" Grid.Column="0" Margin="5" Text="Price" />
<TextBlock Grid.Row="0" Grid.Column="1" Margin="5" HorizontalAlignment="Right" Text="{Binding Price, StringFormat={}{0:c}, FallbackValue=$0.00}"/>
<TextBlock Grid.Row="1" Grid.Column="0" Margin="5" Text="Changes" />
<TextBlock Grid.Row="1" Grid.Column="1" Margin="5" HorizontalAlignment="Right" Text="{Binding Changes, StringFormat={}{0:c}, FallbackValue=$0.00}"/>
</Grid>
</Grid>
</Border>
</UserControl>