<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="MaterialDesignIcons.xaml"/> <ResourceDictionary Source="Dictionary_MyStyle.xaml"/> </ResourceDictionary.MergedDictionaries> <ControlTemplate x:Key="WindowBigCloseControlTemplate" TargetType="{x:Type Window}"> <Grid> <Grid HorizontalAlignment="Right" VerticalAlignment="Top" Height="120" Width="120"> <Ellipse Fill="Black" Height="120" Width="120" HorizontalAlignment="Center" VerticalAlignment="Center"/> </Grid> <Border CornerRadius="3" BorderThickness="5" BorderBrush="Black" Background="White" Margin="0,60,60,0"> <AdornerDecorator> <ContentPresenter/> </AdornerDecorator> </Border> <Button Name="button_close" Style="{StaticResource ButtonStyle_empty}" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="5" Background="{x:Null}" BorderThickness="0" > <Grid HorizontalAlignment="Center" VerticalAlignment="Center" > <Ellipse Fill="White" Height="110" Width="{Binding Height,RelativeSource={RelativeSource Mode=Self}}" HorizontalAlignment="Center" VerticalAlignment="Center"/> <Path Data="{StaticResource Geometry_close-circle}" Fill="Red" Stretch="Fill" Height="100" Width="{Binding Height,RelativeSource={RelativeSource Mode=Self}}" VerticalAlignment="Center" HorizontalAlignment="Center" /> </Grid> </Button> </Grid> </ControlTemplate> <Style x:Key="WindowBigCloseStyle" TargetType="{x:Type Window}"> <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/> <Setter Property="Background" Value="{x:Null}"/> <Setter Property="ResizeMode" Value="NoResize"/> <Setter Property="WindowStyle" Value="None"/> <Setter Property="AllowsTransparency" Value="True"/> <Setter Property="SizeToContent" Value="WidthAndHeight" /> <Setter Property="Template" Value="{StaticResource WindowBigCloseControlTemplate}" /> </Style> </ResourceDictionary>