I made a round window with Border
like this:
<Border CornerRadius="{Binding WindowCornerRadius}" Background="{StaticResource BackgroundDarkBrush}">
<Border.Effect>
<DropShadowEffect ShadowDepth="0" Opacity="0.2"></DropShadowEffect>
</Border.Effect>
</Border>
<Grid>
<Grid.RowDefinitions>
<!--Title Bar-->
<RowDefinition Height="{Binding TitleHeightGridLength}"></RowDefinition>
<RowDefinition Height="auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<!--Title Bar-->
<Border Background="{StaticResource TitleBrush}" CornerRadius="{Binding WindowCornerRadius,WindowCornerRadius,0,0}">
<Grid Grid.Column="0" Panel.ZIndex="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Button Style="{StaticResource SystemIconButton}" Command="{Binding MenuCommand}">
<Image Source="Images/Logo/Wink.png"></Image>
</Button>
</Grid>
</Border>
</Grid>
</Grid>
</Border>
As you see I changed Background of first GridRow
and this prevents it to be round(To have corner radius) and I would like to correct it adding border to first GridRow
But I failed. The code above gives me error in CornerRadius="{Binding WindowCornerRadius,WindowCornerRadius,0,0}"
:
No constructor for type "Binding" has 4 arguments.
My question is am I doing it correct by adding another border? (If yes how can I Bind CornerRadius
individually).