终端一体化运控平台
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

2 роки тому
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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>