Skip to content

WASM: Binding to a GradientStop Color on a LinearGradientBrush does not display the colour. #12601

Closed

Description

@BrianDT

Current behavior

No colour is displayed

This is the type of XAML.

                    <GradientStop Color="{x:Bind VM.ColourIndex, Mode=OneWay, Converter={StaticResource bodyColourConverter}, ConverterParameter=B}" Offset="0.5"/>

See the sample for the full context

Expected behavior

Should work like the other platforms where the Color property can be bound

How to reproduce it (as minimally and precisely as possible)

Project to reproduce is here:
https://github.com/BrianDT/UnoBoundColourGradientIssue.git

Workaround

Hard code the color and have multiple shapes with a converter on the visibility

Works on UWP/WinUI

Yes

Environment

Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia

NuGet package version(s)

Uno.WinUI 4.9.20

Affected platforms

WebAssembly

IDE

Visual Studio 2022

IDE version

17.6.2

Relevant plugins

No response

Anything else we need to know?

No response

Activity

  1. added
    difficulty/tbd
    kind/bug
    triage/untriaged
    on Jun 11, 2023
  2. added
    project/shapes-brushes 🔶
    platform/wasm 🌐
    on Jun 11, 2023
  3. jeromelaban commented on Jun 19, 2023

    @jeromelaban
    Member

    Thanks for the report. It seems that the Color property is not reflecting changes made to its values:

    new FrameworkPropertyMetadata(Colors.Transparent)

    This would need to be adjusted in Brush so it refreshes its state once the gradient values change.

  4. self-assigned this
    on Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

difficulty/tbdkind/bugplatform/wasm 🌐project/shapes-brushes 🔶triage/untriaged

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions