fixed #235
This commit is contained in:
1 parent
390899d730
commit
6be3af2392
3 files changed
+10
-8
No files matched your search
@@ -114,7 +114,7 @@
|
||||
<RowDefinition Height="Auto" MinHeight="30"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Grid.Row="1" CornerRadius="0,0,4,4" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
|
||||
<Border Grid.Row="1" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource CornerRadiusSplitConverter},ConverterParameter='0,0,1,1'}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
|
||||
<ContentPresenter Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||
</Border>
|
||||
<Border Grid.Row="0" MinHeight="30" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{Binding Path=(controls:TitleElement.Background),RelativeSource={RelativeSource TemplatedParent}}" CornerRadius="4,4,0,0">
|
||||
@@ -129,7 +129,7 @@
|
||||
<ColumnDefinition Width="Auto" MinWidth="30"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Grid.Column="1" CornerRadius="0,4,4,0" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
|
||||
<Border Grid.Column="1" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource CornerRadiusSplitConverter},ConverterParameter='0,1,1,0'}" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}">
|
||||
<ContentPresenter Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||
</Border>
|
||||
<Border Grid.Column="0" MinWidth="30" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{Binding Path=(controls:TitleElement.Background),RelativeSource={RelativeSource TemplatedParent}}" CornerRadius="4,0,0,4">
|
||||
|
||||
@@ -16,10 +16,11 @@ namespace HandyControl.Tools.Converter
|
||||
var arr = str.Split(',');
|
||||
if (arr.Length != 4) return cornerRadius;
|
||||
|
||||
return new CornerRadius(arr[0].Equals("1") ? cornerRadius.TopLeft : 0,
|
||||
return new CornerRadius(
|
||||
arr[0].Equals("1") ? cornerRadius.TopLeft : 0,
|
||||
arr[1].Equals("1") ? cornerRadius.TopRight : 0,
|
||||
arr[1].Equals("1") ? cornerRadius.BottomRight : 0,
|
||||
arr[1].Equals("1") ? cornerRadius.BottomLeft : 0);
|
||||
arr[2].Equals("1") ? cornerRadius.BottomRight : 0,
|
||||
arr[3].Equals("1") ? cornerRadius.BottomLeft : 0);
|
||||
}
|
||||
}
|
||||
return value;
|
||||
|
||||
@@ -16,10 +16,11 @@ namespace HandyControl.Tools.Converter
|
||||
var arr = str.Split(',');
|
||||
if (arr.Length != 4) return thickness;
|
||||
|
||||
return new Thickness(arr[0].Equals("1") ? thickness.Left : 0,
|
||||
return new Thickness(
|
||||
arr[0].Equals("1") ? thickness.Left : 0,
|
||||
arr[1].Equals("1") ? thickness.Top : 0,
|
||||
arr[1].Equals("1") ? thickness.Right : 0,
|
||||
arr[1].Equals("1") ? thickness.Bottom : 0);
|
||||
arr[2].Equals("1") ? thickness.Right : 0,
|
||||
arr[3].Equals("1") ? thickness.Bottom : 0);
|
||||
}
|
||||
}
|
||||
return value;
|
||||
|
||||
Reference in new issue
Block a user