xamarin/Xamarin.Forms

Style Classes don't play with Resource Keys

オープン

#4,894 opened on 2019/01/04

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

Repository metrics

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

説明

Description

Resource Keys override style classes.

Steps to Reproduce

  1. MainPage.xaml
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="XFBindingTest.MainPage">
    <ContentPage.Resources>
        <ResourceDictionary>
            <Style TargetType="BoxView" Class="Base">
                <Setter Property="BackgroundColor" Value="Lime"/>
            </Style>
        </ResourceDictionary>
    </ContentPage.Resources>

    <BoxView StyleClass="Base"/>

</ContentPage>
  1. Run
  2. See lime color
-            <Style TargetType="BoxView" Class="Base">
+            <Style TargetType="BoxView" Class="Base" x:Key="Key">
  1. Run
  2. See white color

Expected Behavior

  1. See lime color

Actual Behavior

  1. See white color

Basic Information

  • Version with issue: 3.4.0.1008975
  • IDE: Visual Studio 2017
  • Platform Target Frameworks:
    • UWP: 16299

Screenshots

image 6. image

Related

#4895

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