Skip to content

Different resource images for dark/light mode in xaml #1916

Open
@julian-baumann

Description

@julian-baumann

How can I use different images for example for the "ButtonToolItem" or "RadioToolItem" based on whether the app is in dark or light mode.
Let's say I want a white "plus" icon in dark mode and a black one in light mode. How can i achieve that?
Or is there any API to determine dark/light mode on macOS/Linux(GTK)?

Code that Demonstrates the Problem

<ButtonToolItem Text="Add" Image="{Resource Test.Resources.plus.png}" />

Or is there any other common way of doing this? I'm relative new to C# and Eto.Forms.

Would be nice, if someone could help me out on this one.

Specifications

  • Version:
  • Platform(s): Mac
  • Operating System(s): macOS 11.2.3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions