Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
StephaneDelcroix committed Apr 7, 2023
1 parent 6956d54 commit af09d9a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controls/src/Core/MergedStyle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ void SetStyle(IStyle implicitStyle, IList<Style> classStyles, IStyle style)
{
bool shouldReApplyStyle = implicitStyle != ImplicitStyle || classStyles != ClassStyles || Style != style;
bool shouldReApplyClassStyle = implicitStyle != ImplicitStyle || classStyles != ClassStyles;
bool shouldReApplyImplicitStyle = implicitStyle != ImplicitStyle && (Style as Style == null || ((Style)Style).CanCascade);
bool shouldReApplyImplicitStyle = implicitStyle != ImplicitStyle;

if (shouldReApplyStyle)
Style?.UnApply(Target);
Expand Down
1 change: 1 addition & 0 deletions src/Controls/src/Core/Style.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ void UnApplyCore(BindableObject bindable, Style basedOn)
((AttachedCollection<Behavior>)Behaviors).DetachFrom(bindable);

if (!specificities.TryGetValue(bindable, out var specificity))
return;

foreach (Setter setter in Setters)
setter.UnApply(bindable, (SetterSpecificity)specificity);
Expand Down

0 comments on commit af09d9a

Please sign in to comment.