Browse Source

Merge pull request #2374 from AvaloniaUI/fixes/2280-style-usercontrols

Don't override UserControl.StyleKey.
pull/2382/head
Jumar Macato 7 years ago
committed by GitHub
parent
commit
6ca4027314
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/Avalonia.Controls/UserControl.cs
  2. 2
      src/Avalonia.Themes.Default/UserControl.xaml

3
src/Avalonia.Controls/UserControl.cs

@ -27,9 +27,6 @@ namespace Avalonia.Controls
remove { _nameScope.Unregistered -= value; }
}
/// <inheritdoc/>
Type IStyleable.StyleKey => typeof(UserControl);
/// <inheritdoc/>
void INameScope.Register(string name, object element)
{

2
src/Avalonia.Themes.Default/UserControl.xaml

@ -1,4 +1,4 @@
<Style xmlns="https://github.com/avaloniaui" Selector="UserControl">
<Style xmlns="https://github.com/avaloniaui" Selector=":is(UserControl)">
<Setter Property="Template">
<ControlTemplate>
<ContentPresenter Name="PART_ContentPresenter"

Loading…
Cancel
Save