RiskView.xaml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <windows:TradeAccountWindow x:Class="Muchinfo.MTPClient.Account.Views.RiskView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:convert="clr-namespace:Muchinfo.MTPClient.Infrastructure.Converters;assembly=Client.Infrastructure"
  5. xmlns:resource="clr-namespace:Muchinfo.MTPClient.Resources;assembly=Client.Resources"
  6. xmlns:windows="clr-namespace:Muchinfo.MTPClient.Infrastructure.Windows;assembly=Client.Infrastructure"
  7. Name="riskWindow"
  8. Title="{x:Static resource:Client_Resource.Risk_Title}"
  9. Width="250"
  10. Height="160"
  11. ShowInTaskbar="False"
  12. Style="{DynamicResource WindowBaseStyle}"
  13. Topmost="True">
  14. <Window.Resources>
  15. <convert:FontColorConvert x:Key="colorConvert" />
  16. <Style TargetType="{x:Type TextBlock}">
  17. <Setter Property="VerticalAlignment" Value="Center" />
  18. <Setter Property="Foreground" Value="{Binding RiskLevel, Converter={StaticResource colorConvert}}" />
  19. </Style>
  20. </Window.Resources>
  21. <windows:TradeAccountWindow.Triggers>
  22. <EventTrigger RoutedEvent="Window.Loaded">
  23. <BeginStoryboard>
  24. <Storyboard x:Name="Storyboard1">
  25. <DoubleAnimation Duration="0:0:3"
  26. From="0"
  27. Storyboard.TargetName="riskWindow"
  28. Storyboard.TargetProperty="Opacity"
  29. To="1" />
  30. </Storyboard>
  31. </BeginStoryboard>
  32. </EventTrigger>
  33. </windows:TradeAccountWindow.Triggers>
  34. <Grid Margin="5"
  35. Background="Transparent"
  36. MouseDown="Grid_MouseDown">
  37. <TextBlock HorizontalAlignment="Left"
  38. VerticalAlignment="Top"
  39. Text="{Binding RiskContent}"
  40. TextTrimming="CharacterEllipsis" />
  41. </Grid>
  42. </windows:TradeAccountWindow>