title: Is Selector in Avalonia Style
body: <p>I have a baseButtonStyle, which should apply to all Buttons and all derived types. It works well for all Buttons (excluding derived).</p>
  
  <pre><code>&lt;Style x:Key="BaseButtonStyle" Selector="is Button" &gt;
      &lt;Setter Property="BorderThickness" Value="1"/&gt;
      &lt;Setter Property="Foreground" Value="{StaticResource SecondaryFontBrush}"/&gt;
      &lt;Setter Property="BorderBrush" Value="{StaticResource BlueButtonNormalBorderBrush}"/&gt;
      &lt;Setter Property="Background" Value="{StaticResource BlueButtonNormalBackgroundBrush}"/&gt;
      &lt;Setter Property="UseLayoutRounding" Value="True"/&gt;
      &lt;Setter Property="Padding" Value="10"/&gt;
      &lt;Setter Property="Margin" Value="10"/&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>Now I have an AdditionalTextButton derived from Button.</p>
  
  <pre><code>using Avalonia;
  using Avalonia.Controls;
  using Avalonia.Media;
  using System;
  
  namespace VW7OrbMachineAvalonia1.Components.Controls
  {
  
      public class AdditionalTextButton : Button
      {
  
          Type IStyleable.StyleKey =&gt; typeof(AdditionalTextButton);
  
          /// &lt;summary&gt;
          /// Bottom left displayed Text
          /// &lt;/summary&gt;
          public string BottomLeftText
          {
              get { return (string)GetValue(BottomLeftTextProperty); }
              set { SetValue(BottomLeftTextProperty, value); }
          }
  
          public static readonly StyledProperty&lt;String&gt; BottomLeftTextProperty =
              AvaloniaProperty.Register&lt;AdditionalTextButton, String&gt;("BottomLeftText");
      }
  }
  </code></pre>
  
  <p>My understanding of the style behavior of Avalonia is, that the BaseButtonStyle should apply to to AdditionalTextButton because of the <code>is Button</code> Selector. But this does not happen.</p>
  
  <p>Beside that, I have another style which should apply to all AdditionaltextButtons. This also works fine.</p>
  
  <pre><code>&lt;Style x:Key="additionalTextButtonStyle" Selector="is vwaui:Additionaltextbutton"&gt;
      &lt;Setter Property="FontSize" Value="22"/&gt;
      &lt;Setter Property="Template"&gt;
        &lt;Setter.Value&gt;
          &lt;ControlTemplate&gt;
            &lt;Grid Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"&gt;
                  &lt;TextBlock HorizontalAlignment="Left" VerticalAlignment="Bottom"  TextWrapping="Wrap" Text="{TemplateBinding BottomLeftText}"/&gt;
                  &lt;TextBlock HorizontalAlignment="Center" VerticalAlignment="Center"  TextWrapping="Wrap" Text="{TemplateBinding Content}"/&gt;
            &lt;/Grid&gt;
          &lt;/ControlTemplate&gt;
        &lt;/Setter.Value&gt;
      &lt;/Setter&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>How can I get the result, that the AdditionalTextButton is styled by the BaseButtonStyle AND by the AdditionalTextButtonStyle? Setters from AdditionalTextButtonStyle should overwrite setters from BaseButtonStyle.</p>