Skip to content

Commit

Permalink
fix: Make sure that all ControlTemplate properties are not propagatin…
Browse files Browse the repository at this point in the history
…g the DataContext
  • Loading branch information
dr1rrb committed Jul 15, 2020
1 parent 902ac10 commit 5f6049d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Uno.UI/UI/Xaml/Controls/Control/Control.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ public ControlTemplate Template
}

// Using a DependencyProperty as the backing store for Template. This enables animation, styling, binding, etc...
public static DependencyProperty TemplateProperty { get ; } =
DependencyProperty.Register("Template", typeof(ControlTemplate), typeof(Control), new FrameworkPropertyMetadata(null, (s, e) => ((Control)s)?.OnTemplateChanged(e)));
public static DependencyProperty TemplateProperty { get; } =
DependencyProperty.Register("Template", typeof(ControlTemplate), typeof(Control), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.ValueDoesNotInheritDataContext, (s, e) => ((Control)s)?.OnTemplateChanged(e)));

private void OnTemplateChanged(DependencyPropertyChangedEventArgs e)
{
Expand Down

0 comments on commit 5f6049d

Please sign in to comment.