Skip to content

Commit 22bb419

Browse files
Merge pull request #32 from WPFDevelopersOrg/dev
Dev
2 parents 930134c + 5f21902 commit 22bb419

File tree

3 files changed

+25
-15
lines changed

3 files changed

+25
-15
lines changed

src/WPFDevelopers.Shared/Styles/Styles.CheckBox.xaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@
1111
<Style x:Key="DefaultCheckBox" TargetType="{x:Type CheckBox}" BasedOn="{StaticResource ControlBasicStyle}">
1212
<!--<Setter Property="FocusVisualStyle" Value="{x:Null}" />-->
1313
<Setter Property="Padding" Value="4,0"/>
14-
14+
<Setter Property="VerticalAlignment" Value="Center"/>
15+
<Setter Property="HorizontalAlignment" Value="Left"/>
1516
<Setter Property="Template">
1617
<Setter.Value>
1718
<ControlTemplate TargetType="{x:Type CheckBox}">
18-
<BulletDecorator Background="Transparent">
19+
<BulletDecorator Background="Transparent"
20+
Margin="{TemplateBinding Margin}">
1921
<BulletDecorator.Bullet>
20-
<Border CornerRadius="{Binding ElementName=PART_Border,Path=CornerRadius}">
22+
<Border CornerRadius="{Binding ElementName=PART_Border,Path=CornerRadius}"
23+
VerticalAlignment="{TemplateBinding VerticalAlignment}"
24+
HorizontalAlignment="{TemplateBinding HorizontalAlignment}">
2125
<Border x:Name="PART_Border"
2226
Width="16" Height="16"
2327
CornerRadius="3"

src/WPFDevelopers.Shared/Styles/Styles.ListBox.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414
<Setter Property="ScrollViewer.CanContentScroll" Value="True" />
1515
<Setter Property="MinWidth" Value="120" />
1616
<Setter Property="MinHeight" Value="95" />
17+
<Setter Property="BorderThickness" Value="0,1,0,0"/>
1718
<Setter Property="Template">
1819
<Setter.Value>
1920
<ControlTemplate TargetType="{x:Type ListBox}">
20-
<Border Name="Border" BorderThickness="0,1,0,0"
21+
<Border Name="Border" BorderThickness="{TemplateBinding BorderThickness}"
2122
BorderBrush="{DynamicResource BaseSolidColorBrush}">
2223
<ScrollViewer Focusable="False">
2324
<VirtualizingStackPanel IsItemsHost="True" />

src/WPFDevelopers.Shared/Styles/Styles.RadioButton.xaml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,31 @@
1313
<Setter Property="Background" Value="{DynamicResource WindowForegroundColorBrush}"/>
1414
<Setter Property="BorderThickness" Value="1"/>
1515
<Setter Property="Padding" Value="4,0"/>
16-
16+
<Setter Property="VerticalAlignment" Value="Center"/>
17+
<Setter Property="HorizontalAlignment" Value="Left"/>
1718
<Setter Property="Template">
1819
<Setter.Value>
1920
<ControlTemplate TargetType="{x:Type RadioButton}">
20-
<BulletDecorator Background="Transparent">
21+
<BulletDecorator Background="Transparent"
22+
Margin="{TemplateBinding Margin}">
2123
<BulletDecorator.Bullet>
22-
<controls:SmallPanel MinWidth="16" MinHeight="16" >
23-
<Ellipse x:Name="PART_Border"
24+
<Border VerticalAlignment="{TemplateBinding VerticalAlignment}"
25+
HorizontalAlignment="{TemplateBinding HorizontalAlignment}">
26+
<controls:SmallPanel MinWidth="16" MinHeight="16" >
27+
<Ellipse x:Name="PART_Border"
2428
StrokeThickness="{TemplateBinding BorderThickness}"
2529
Fill="{TemplateBinding Background}"
2630
Stroke="{DynamicResource BaseSolidColorBrush}">
27-
</Ellipse>
28-
<Ellipse x:Name="PART_Ellipse" Fill="{DynamicResource WindowForegroundColorBrush}"
31+
</Ellipse>
32+
<Ellipse x:Name="PART_Ellipse" Fill="{DynamicResource WindowForegroundColorBrush}"
2933
MinWidth="6" MinHeight="6"
3034
RenderTransformOrigin=".5,.5">
31-
<Ellipse.RenderTransform>
32-
<ScaleTransform ScaleX="0" ScaleY="0"/>
33-
</Ellipse.RenderTransform>
34-
</Ellipse>
35-
</controls:SmallPanel>
35+
<Ellipse.RenderTransform>
36+
<ScaleTransform ScaleX="0" ScaleY="0"/>
37+
</Ellipse.RenderTransform>
38+
</Ellipse>
39+
</controls:SmallPanel>
40+
</Border>
3641
</BulletDecorator.Bullet>
3742
<ContentPresenter x:Name="PART_ContentPresenter"
3843
ContentTemplate="{TemplateBinding ContentTemplate}"

0 commit comments

Comments
 (0)