xamarin/Xamarin.Forms

[Bug] [Core] Style.Setter is not applied for CornerRadius when using multiple StyleClasses

オープン

#6,797 opened on 2019/07/05

 (1 件のコメント) (0 件のリアクション) (0 人の担当者)C# (1,926 件のフォーク)batch import
a/stylee/3 :clock3:help wantedt/bug :bug:up-for-grabs

Repository metrics

Stars
 (5,644 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

Description

Style.Setter is not applied for CornerRadius when using multiple StyleClasses

Steps to Reproduce

use the following:

       <StackLayout Padding="10">
           <StackLayout.Resources>
               <ResourceDictionary>
                   <Style Class="Border" TargetType="Button">
                       <Setter Property="CornerRadius" Value="0"/>
                       <Setter Property="BackgroundColor" Value="Yellow"/>
                       <Setter Property="BorderWidth" Value="1" />
                   </Style>
                   <Style Class="Color" TargetType="Button">
                       <!-- <Setter Property="CornerRadius" Value="0"/> not even if you set it again here -->
                       <Setter Property="BorderColor" Value="Black" />
                   </Style>
               </ResourceDictionary>
           </StackLayout.Resources>
           <Button StyleClass="Border,Color" Text="BackgroundColor and BorderWidth is applied from class 'Border', but CornerRadius not" />
           <Button StyleClass="Border" Text="All properties are applied from class 'Border'" />
       </StackLayout>

Expected Behavior

CornerRadius should be set to 0 for the first button as well.

Actual Behavior

CornerRadius is unset.

Basic Information

  • Version with issue: 3.6.0.539721
  • Platform Target Frameworks:
    • iOS: 12.3.1
    • Android: 9

コントリビューターガイド