Skip to content

Commit

Permalink
fixed a render bug of rate
Browse files Browse the repository at this point in the history
  • Loading branch information
NaBian committed Feb 3, 2021
1 parent 2b1973f commit 1457b99
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 26 deletions.
8 changes: 0 additions & 8 deletions src/Net_40/HandyControl_Net_40/Themes/Theme.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9687,14 +9687,6 @@
</Style>
<Style x:Key="RateRateItemBaseStyle" TargetType="hc:RateItem">
<Setter Property="Focusable" Value="False" />
<Setter Property="Margin" Value="{Binding ItemMargin,RelativeSource={RelativeSource AncestorType=hc:Rate}}" />
<Setter Property="Width" Value="{Binding ItemWidth,RelativeSource={RelativeSource AncestorType=hc:Rate}}" />
<Setter Property="Height" Value="{Binding ItemHeight,RelativeSource={RelativeSource AncestorType=hc:Rate}}" />
<Setter Property="AllowHalf" Value="{Binding AllowHalf,RelativeSource={RelativeSource AncestorType=hc:Rate}}" />
<Setter Property="AllowClear" Value="{Binding AllowClear,RelativeSource={RelativeSource AncestorType=hc:Rate}}" />
<Setter Property="Icon" Value="{Binding Icon,RelativeSource={RelativeSource AncestorType=hc:Rate}}" />
<Setter Property="IsReadOnly" Value="{Binding IsReadOnly,RelativeSource={RelativeSource AncestorType=hc:Rate}}" />
<Setter Property="Background" Value="{Binding Background,RelativeSource={RelativeSource AncestorType=hc:Rate}}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="hc:RateItem">
Expand Down
10 changes: 9 additions & 1 deletion src/Shared/HandyControl_Shared/Controls/Rate/Rate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,15 @@ private void OnApplyTemplateInternal()
{
var item = new RateItem
{
Index = i
Index = i,
Width = ItemWidth,
Height = ItemHeight,
Margin = ItemMargin,
AllowHalf = AllowHalf,
AllowClear = AllowClear,
Icon = Icon,
IsReadOnly = IsReadOnly,
Background = Background
};

Items.Add(item);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@

<Style x:Key="RateRateItemBaseStyle" TargetType="hc:RateItem">
<Setter Property="Focusable" Value="False"/>
<Setter Property="Margin" Value="{Binding ItemMargin,RelativeSource={RelativeSource AncestorType=hc:Rate}}"/>
<Setter Property="Width" Value="{Binding ItemWidth,RelativeSource={RelativeSource AncestorType=hc:Rate}}"/>
<Setter Property="Height" Value="{Binding ItemHeight,RelativeSource={RelativeSource AncestorType=hc:Rate}}"/>
<Setter Property="AllowHalf" Value="{Binding AllowHalf,RelativeSource={RelativeSource AncestorType=hc:Rate}}"/>
<Setter Property="AllowClear" Value="{Binding AllowClear,RelativeSource={RelativeSource AncestorType=hc:Rate}}"/>
<Setter Property="Icon" Value="{Binding Icon,RelativeSource={RelativeSource AncestorType=hc:Rate}}"/>
<Setter Property="IsReadOnly" Value="{Binding IsReadOnly,RelativeSource={RelativeSource AncestorType=hc:Rate}}"/>
<Setter Property="Background" Value="{Binding Background,RelativeSource={RelativeSource AncestorType=hc:Rate}}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="hc:RateItem">
Expand Down Expand Up @@ -86,4 +78,4 @@
</Setter>
</Style>

</ResourceDictionary>
</ResourceDictionary>
8 changes: 0 additions & 8 deletions src/Shared/HandyControl_Shared/Themes/Theme.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9805,14 +9805,6 @@
</Style>
<Style x:Key="RateRateItemBaseStyle" TargetType="hc:RateItem">
<Setter Property="Focusable" Value="False" />
<Setter Property="Margin" Value="{Binding ItemMargin,RelativeSource={RelativeSource AncestorType=hc:Rate}}" />
<Setter Property="Width" Value="{Binding ItemWidth,RelativeSource={RelativeSource AncestorType=hc:Rate}}" />
<Setter Property="Height" Value="{Binding ItemHeight,RelativeSource={RelativeSource AncestorType=hc:Rate}}" />
<Setter Property="AllowHalf" Value="{Binding AllowHalf,RelativeSource={RelativeSource AncestorType=hc:Rate}}" />
<Setter Property="AllowClear" Value="{Binding AllowClear,RelativeSource={RelativeSource AncestorType=hc:Rate}}" />
<Setter Property="Icon" Value="{Binding Icon,RelativeSource={RelativeSource AncestorType=hc:Rate}}" />
<Setter Property="IsReadOnly" Value="{Binding IsReadOnly,RelativeSource={RelativeSource AncestorType=hc:Rate}}" />
<Setter Property="Background" Value="{Binding Background,RelativeSource={RelativeSource AncestorType=hc:Rate}}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="hc:RateItem">
Expand Down

0 comments on commit 1457b99

Please sign in to comment.