Skip to content

Setters of implicit styles are incorrectly propagated #833

Closed

Description

@davidjohnoliver

I'm submitting a...

Bug report (I searched for similar issues and did not find one)

Minimal reproduction of the problem with instructions

Define implicit and explicit Styles in app:

<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	<Style TargetType="Button">
		<Setter Property="Foreground"
				Value="Green" />
	</Style>
	<Style TargetType="Button"
		   x:Key="ExplicitButtonStyle">
		<Setter Property="FontSize"
				Value="20" />
	</Style>
</ResourceDictionary>

Put Buttons in a page:

<StackPanel>
			<Button Content="Implicit style" />
			<Button Content="Explicit style"
					Style="{StaticResource ExplicitButtonStyle}" />
		</StackPanel>

Current behavior

Explicit Style inherits Foreground setter from implicit Style.
iOS:
image

Expected behavior

Explicit Style doesn't inherit Foreground.

UWP:
image

Environment

Nuget Package: Uno.UI

Package Version(s): 1.45.0-dev.1390

Affected platform(s):

  • iOS
  • Android
  • WebAssembly
  • Windows
  • Build tasks

Activity

  1. added
    kind/bug
    on May 1, 2019
  2. added
    platform/android 🤖
    platform/ios 🍎
    platform/wasm 🌐
    on May 22, 2019
  3. added
    project/styling 👔
    on May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugplatform/android 🤖platform/ios 🍎platform/wasm 🌐project/styling 👔

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions