DynamicAGCCard.xaml 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <UserControl x:Class="NEIntelligentControl2.Views.AGC.DynamicAGCCard"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:NEIntelligentControl2.Views.AGC"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800" Unloaded="UserControl_Unloaded" Loaded="UserControl_Loaded">
  9. <UserControl.Resources>
  10. <ResourceDictionary>
  11. <ResourceDictionary.MergedDictionaries>
  12. <ResourceDictionary Source="/Res/HomePageRes.xaml"/>
  13. </ResourceDictionary.MergedDictionaries>
  14. <Style x:Key="ArrowButtonStyleLeft" TargetType="{x:Type Button}">
  15. <Setter Property="Template">
  16. <Setter.Value>
  17. <ControlTemplate TargetType="{x:Type Button}">
  18. <Border Background="#01FFFFFF" VerticalAlignment="Center">
  19. <ContentControl x:Name="cc" Template="{StaticResource left_arrow}" Height="30"/>
  20. </Border>
  21. <ControlTemplate.Triggers>
  22. <Trigger Property="IsMouseOver" Value="true">
  23. <Setter Property="Template" TargetName="cc" Value="{StaticResource left_arrow2}"/>
  24. </Trigger>
  25. </ControlTemplate.Triggers>
  26. </ControlTemplate>
  27. </Setter.Value>
  28. </Setter>
  29. </Style>
  30. <Style x:Key="ArrowButtonStyleRight" TargetType="{x:Type Button}">
  31. <Setter Property="Template">
  32. <Setter.Value>
  33. <ControlTemplate TargetType="{x:Type Button}">
  34. <Border Background="#01FFFFFF" VerticalAlignment="Center">
  35. <ContentControl x:Name="cc" Template="{StaticResource right_arrow}" Height="30"/>
  36. </Border>
  37. <ControlTemplate.Triggers>
  38. <Trigger Property="IsMouseOver" Value="true">
  39. <Setter Property="Template" TargetName="cc" Value="{StaticResource right_arrow2}"/>
  40. </Trigger>
  41. </ControlTemplate.Triggers>
  42. </ControlTemplate>
  43. </Setter.Value>
  44. </Setter>
  45. </Style>
  46. </ResourceDictionary>
  47. </UserControl.Resources>
  48. <Grid Margin="0,0">
  49. <Grid.RowDefinitions>
  50. <RowDefinition/>
  51. </Grid.RowDefinitions>
  52. <Grid.ColumnDefinitions>
  53. <ColumnDefinition Width="Auto"/>
  54. <ColumnDefinition/>
  55. <ColumnDefinition Width="Auto"/>
  56. </Grid.ColumnDefinitions>
  57. <Grid x:Name="_GDMain" Grid.Column="1"/>
  58. <Button Style="{DynamicResource ArrowButtonStyleLeft}" Tag="leftbutton" Click="Button_Click"/>
  59. <Button x:Name="_BTRight" Style="{DynamicResource ArrowButtonStyleRight}" Tag="rightbutton" Click="Button_Click" Grid.Column="2"/>
  60. <local:DotView x:Name="_DVMain" Grid.ColumnSpan="3" Changed="DotView_Changed" VerticalAlignment="Bottom" Margin="0,17"/>
  61. </Grid>
  62. </UserControl>