Guest User

CircleButtonStyle.xaml

a guest
Feb 15th, 2017
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.22 KB | None | 0 0
  1. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  2.                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3.                    xmlns:local="clr-namespace:WPFMaterialDesign.Controls">
  4.    
  5.    
  6.  
  7.     <local:ColorToSolidColorBrushConverter x:Key="ColorBrushConverter"/>
  8.    
  9.    
  10.     <Style TargetType="Button" x:Key="CircleButtonStyle">
  11.         <Setter Property="Template">
  12.             <Setter.Value>
  13.                 <ControlTemplate TargetType="Button" x:Name="CircleButton">
  14.                     <Grid Background="Transparent">
  15.                         <Ellipse Name="Circle" Fill="{TemplateBinding Background}" Width="{TemplateBinding Width}" Height="{TemplateBinding Width}"/>
  16.                         <Viewbox>
  17.                             <Path Stroke="Blue" StrokeThickness="5">
  18.                                 <Path.Data>
  19.                                     <LineGeometry StartPoint="0,0" EndPoint="100,0"/>
  20.                                 </Path.Data>
  21.                             </Path>
  22.                         </Viewbox>
  23.                     </Grid>
  24.                 </ControlTemplate>
  25.             </Setter.Value>
  26.         </Setter>
  27.     </Style>
  28. </ResourceDictionary>
Add Comment
Please, Sign In to add comment