MyButton.xaml 1.1 KB

12345678910111213141516
  1. <Border x:Class="MyButton"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. FocusVisualStyle="{x:Null}" x:Name="PanBack"
  5. Focusable="True" UseLayoutRounding="False" SnapsToDevicePixels="False" Background="{StaticResource ColorBrushSemiTransparent}">
  6. <Border CornerRadius="3" x:Name="PanFore" BorderThickness="1" BorderBrush="{DynamicResource ColorBrush1}" RenderTransformOrigin="0.5,0.5" Background="{StaticResource ColorBrushHalfWhite}">
  7. <Border.RenderTransform>
  8. <ScaleTransform />
  9. </Border.RenderTransform>
  10. <TextBlock TextOptions.TextFormattingMode="Display" SnapsToDevicePixels="True" TextTrimming="None" HorizontalAlignment="Center" x:Name="LabText" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5" Foreground="{Binding Parent.BorderBrush, RelativeSource={RelativeSource Self}}" FontSize="13" IsHitTestVisible="False">
  11. <TextBlock.RenderTransform>
  12. <ScaleTransform />
  13. </TextBlock.RenderTransform>
  14. </TextBlock>
  15. </Border>
  16. </Border>