终端一体化运控平台
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 

101 rinda
4.8 KiB

  1. <UserControl
  2. x:Class="BPASmartClient.CustomResource.UserControls.IcoButton"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:BPASmartClient.CustomResource.UserControls"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. d:DesignHeight="30"
  9. d:DesignWidth="130"
  10. mc:Ignorable="d">
  11. <!--<UserControl.Resources>
  12. <Style x:Key="IcoButtonStyle" TargetType="Button">
  13. <Setter Property="FontFamily" Value="../Fonts/#iconfont" />
  14. <Setter Property="Template">
  15. <Setter.Value>
  16. <ControlTemplate TargetType="Button">
  17. <Border
  18. x:Name="br"
  19. Background="Transparent"
  20. BorderBrush="#FF19B7EC"
  21. BorderThickness="2">
  22. <StackPanel
  23. HorizontalAlignment="Center"
  24. VerticalAlignment="Center"
  25. Orientation="Horizontal">
  26. <TextBlock
  27. HorizontalAlignment="Center"
  28. VerticalAlignment="Center"
  29. FontFamily="{Binding}"
  30. Text="{Binding ElementName=br}" />
  31. <ContentControl
  32. Margin="10,0,5,0"
  33. HorizontalAlignment="Center"
  34. VerticalAlignment="Center"
  35. Content="{TemplateBinding Content}"
  36. Foreground="{TemplateBinding Foreground}" />
  37. </StackPanel>
  38. </Border>
  39. <ControlTemplate.Triggers>
  40. <Trigger Property="IsMouseOver" Value="True">
  41. <Setter TargetName="br" Property="Background" Value="#2219B7EC" />
  42. </Trigger>
  43. <Trigger Property="IsPressed" Value="true">
  44. <Setter TargetName="br" Property="Background" Value="#2219B7EC" />
  45. </Trigger>
  46. </ControlTemplate.Triggers>
  47. </ControlTemplate>
  48. </Setter.Value>
  49. </Setter>
  50. </Style>
  51. </UserControl.Resources>-->
  52. <Grid>
  53. <Button Name="a">
  54. <Button.Style>
  55. <Style TargetType="Button">
  56. <Setter Property="FontFamily" Value="../Fonts/#iconfont" />
  57. <Setter Property="Template">
  58. <Setter.Value>
  59. <ControlTemplate TargetType="Button">
  60. <Border
  61. x:Name="br"
  62. Background="Transparent"
  63. BorderBrush="#FF19B7EC"
  64. BorderThickness="2">
  65. <StackPanel
  66. HorizontalAlignment="Center"
  67. VerticalAlignment="Center"
  68. Orientation="Horizontal">
  69. <TextBlock
  70. FontFamily="../Fonts/#iconfont"
  71. Text="{Binding IcoText}" />
  72. <ContentControl
  73. Margin="10,0,5,0"
  74. Content="{TemplateBinding Content}"
  75. Foreground="{TemplateBinding Foreground}" />
  76. </StackPanel>
  77. </Border>
  78. <ControlTemplate.Triggers>
  79. <Trigger Property="IsMouseOver" Value="True">
  80. <Setter TargetName="br" Property="Background" Value="#2219B7EC" />
  81. </Trigger>
  82. <Trigger Property="IsPressed" Value="true">
  83. <Setter TargetName="br" Property="Background" Value="#2219B7EC" />
  84. </Trigger>
  85. </ControlTemplate.Triggers>
  86. </ControlTemplate>
  87. </Setter.Value>
  88. </Setter>
  89. </Style>
  90. </Button.Style>
  91. </Button>
  92. </Grid>
  93. </UserControl>