MyExtraTextButton.xaml 2.0 KB

123456789101112131415161718192021222324252627282930313233
  1. <Grid
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:local="clr-namespace:PCL"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. x:Name="PanBack" mc:Ignorable="d" x:Class="MyExtraTextButton"
  7. RenderTransformOrigin="0.5,0.5" Height="52" Margin="20" Cursor="Hand">
  8. <Grid.RenderTransform>
  9. <ScaleTransform ScaleX="0" ScaleY="0" />
  10. </Grid.RenderTransform>
  11. <Border x:Name="PanClick" BorderThickness="0.001" Background="{StaticResource ColorBrushSemiTransparent}"
  12. CornerRadius="{Binding ActualHeight, ConverterParameter=0.4, Converter={StaticResource MultiplicationConverter}, ElementName=PanBack, Mode=OneWay}"/>
  13. <Grid x:Name="PanScale" IsHitTestVisible="False" RenderTransformOrigin="0.5,0.5" Margin="0,10,0,0">
  14. <Grid.RenderTransform>
  15. <ScaleTransform />
  16. </Grid.RenderTransform>
  17. <Border x:Name="PanColor" BorderThickness="0.001" Background="{DynamicResource ColorBrush3}"
  18. CornerRadius="{Binding ActualHeight, ConverterParameter=0.4, Converter={StaticResource MultiplicationConverter}, ElementName=PanBack, Mode=OneWay}">
  19. <Border.Effect>
  20. <DropShadowEffect ShadowDepth="0" BlurRadius="10" Opacity="0.2" />
  21. </Border.Effect>
  22. </Border>
  23. <StackPanel Orientation="Horizontal" Margin="20,0" SnapsToDevicePixels="False" UseLayoutRounding="False">
  24. <Path x:Name="Path" Stretch="Uniform" Margin="2,12,0,12" Fill="{DynamicResource ColorBrush8}" RenderTransformOrigin="0.5,0.5">
  25. <Path.RenderTransform>
  26. <ScaleTransform />
  27. </Path.RenderTransform>
  28. </Path>
  29. <TextBlock x:Name="LabText" VerticalAlignment="Center" Foreground="{DynamicResource ColorBrush8}" FontSize="16"
  30. Margin="12,0,0,0.8" />
  31. </StackPanel>
  32. </Grid>
  33. </Grid>