mirror of
https://gitee.com/chinware/atomui.git
synced 2024-11-29 18:38:16 +08:00
Fixed CheckBox Mark Size calculated Bug
This commit is contained in:
parent
d0f71b4cc5
commit
aeca918ce5
@ -130,7 +130,6 @@ internal class CheckBoxIndicator : Control, IWaveAdornerInfoProvider
|
||||
public override void ApplyTemplate()
|
||||
{
|
||||
base.ApplyTemplate();
|
||||
SetupIndicatorCheckedMarkEffectSize();
|
||||
Transitions ??= new Transitions
|
||||
{
|
||||
AnimationUtils.CreateTransition<SolidColorBrushTransition>(BackgroundProperty),
|
||||
@ -177,6 +176,12 @@ internal class CheckBoxIndicator : Control, IWaveAdornerInfoProvider
|
||||
WaveSpiritAdorner.ShowWaveAdorner(this, WaveType.RoundRectWave);
|
||||
}
|
||||
}
|
||||
|
||||
if (e.Property == SizeProperty)
|
||||
{
|
||||
CollectStyleState();
|
||||
SetupIndicatorCheckedMarkEffectSize();
|
||||
}
|
||||
}
|
||||
|
||||
private void SetupIndicatorCheckedMarkEffectSize()
|
||||
|
@ -46,6 +46,7 @@ internal class CheckBoxTheme : BaseControlTheme
|
||||
{
|
||||
Name = IndicatorPart
|
||||
};
|
||||
CreateTemplateParentBinding(indicator, CheckBoxIndicator.IsEnabledProperty, CheckBox.IsEnabledProperty);
|
||||
CreateTemplateParentBinding(indicator, CheckBoxIndicator.IsCheckedProperty, CheckBox.IsCheckedProperty);
|
||||
layout.Children.Add(indicator);
|
||||
|
||||
|
@ -47,8 +47,8 @@ internal class RadioButtonTheme : BaseControlTheme
|
||||
{
|
||||
Name = IndicatorPart
|
||||
};
|
||||
|
||||
CreateTemplateParentBinding(indicator, CheckBoxIndicator.IsCheckedProperty, RadioButton.IsCheckedProperty);
|
||||
CreateTemplateParentBinding(indicator, RadioIndicator.IsEnabledProperty, RadioButton.IsEnabledProperty);
|
||||
CreateTemplateParentBinding(indicator, RadioIndicator.IsCheckedProperty, RadioButton.IsCheckedProperty);
|
||||
layout.Children.Add(indicator);
|
||||
|
||||
var contentPresenter = new ContentPresenter()
|
||||
|
Loading…
Reference in New Issue
Block a user