NoticeView.xaml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <windows:TradeAccountWindow x:Class="Muchinfo.MTPClient.Account.Views.NoticeView"
  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="noticeWindow"
  8. Width="250"
  9. Height="160"
  10. Background="{DynamicResource CommonBorderBrush}"
  11. ShowInTaskbar="False"
  12. Style="{DynamicResource WindowBaseStyle}"
  13. Topmost="True">
  14. <Window.Resources>
  15. <convert:FontColorConvert x:Key="colorConvert" />
  16. <convert:RiskLevelToVisibilityConverter x:Key="RiskLevelConvert" />
  17. <convert:RiskLevelToVisibilityDifConverter x:Key="RiskLevelDifConvert" />
  18. <BooleanToVisibilityConverter x:Key="ToVisibilityConverter" />
  19. <Style x:Key="RiskLevelTextBlock" TargetType="{x:Type TextBlock}">
  20. <Setter Property="Foreground" Value="{Binding RiskLevel, Converter={StaticResource colorConvert}}" />
  21. </Style>
  22. </Window.Resources>
  23. <windows:TradeAccountWindow.Triggers>
  24. <EventTrigger RoutedEvent="Window.Loaded">
  25. <BeginStoryboard>
  26. <Storyboard x:Name="Storyboard1">
  27. <DoubleAnimation Duration="0:0:3"
  28. From="0"
  29. Storyboard.TargetName="noticeWindow"
  30. Storyboard.TargetProperty="Opacity"
  31. To="1" />
  32. </Storyboard>
  33. </BeginStoryboard>
  34. </EventTrigger>
  35. </windows:TradeAccountWindow.Triggers>
  36. <Grid MouseDown="Grid_MouseDown">
  37. <!--
  38. <Grid Margin="5"
  39. Background="Transparent"
  40. MouseDown="Grid_MouseDown">
  41. <Grid.RowDefinitions>
  42. <RowDefinition />
  43. <RowDefinition />
  44. <RowDefinition />
  45. <RowDefinition />
  46. </Grid.RowDefinitions>
  47. <Grid.ColumnDefinitions>
  48. <ColumnDefinition Width="auto" />
  49. <ColumnDefinition />
  50. </Grid.ColumnDefinitions>
  51. <TextBlock Grid.Row="0"
  52. Grid.Column="0"
  53. HorizontalAlignment="Right"
  54. Text="{x:Static resource:Client_Resource.NoticeView_Theme}" />
  55. <TextBlock Grid.Row="0"
  56. Grid.Column="1"
  57. HorizontalAlignment="Left"
  58. Text="{Binding NoticeTitle}" />
  59. <TextBlock Grid.Row="1"
  60. Grid.Column="0"
  61. HorizontalAlignment="Right"
  62. Text="{x:Static resource:Client_Resource.NoticeView_Publisher}" />
  63. <TextBlock Grid.Row="1"
  64. Grid.Column="1"
  65. HorizontalAlignment="Left">
  66. <Run Text="{Binding NoticePubExchName}" />
  67. </TextBlock>
  68. <TextBlock Grid.Row="2"
  69. Grid.Column="0"
  70. HorizontalAlignment="Right"
  71. Text="{x:Static resource:Client_Resource.NoticeView_PublishDate}" />
  72. <TextBlock Grid.Row="2"
  73. Grid.Column="1"
  74. HorizontalAlignment="Left">
  75. <Run Text="{Binding NoticePublishDateString}" />
  76. </TextBlock>
  77. <TextBlock Grid.Row="3"
  78. Grid.Column="0"
  79. HorizontalAlignment="Right"
  80. Text="{x:Static resource:Client_Resource.NoticeView_ValidDate}" />
  81. <TextBlock Grid.Row="3"
  82. Grid.Column="1"
  83. HorizontalAlignment="Left"
  84. Text="{Binding NoticeValidDateString}" />
  85. </Grid>
  86. -->
  87. <TextBlock Margin="5"
  88. VerticalAlignment="Center"
  89. Text="{Binding TITLE}"
  90. TextWrapping="Wrap"
  91. Visibility="{Binding RiskLevel,
  92. Converter={StaticResource RiskLevelDifConvert}}" />
  93. <TextBlock Margin="5"
  94. VerticalAlignment="Center"
  95. ScrollViewer.HorizontalScrollBarVisibility="Auto"
  96. ScrollViewer.VerticalScrollBarVisibility="Auto"
  97. Style="{StaticResource ResourceKey=RiskLevelTextBlock}"
  98. Text="{Binding TITLE}"
  99. TextWrapping="Wrap"
  100. Visibility="{Binding RiskLevel,
  101. Converter={StaticResource RiskLevelConvert}}" />
  102. </Grid>
  103. </windows:TradeAccountWindow>