Skip to content

[Enhancement] Add a converter to convert string to Brush #63

Description

@LenFon

Summary

The ViewModel stores color strings, while WPF controls require Brush objects.

API Changes

StringToBrushConverter

Intended Use Case

public string BgColor { get; set; } = "#FF2E86AB";
<Border Background="{Binding BgColor, Converter={StaticResource StringToBrushConverter}}"
        Width="200" Height="100"/>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions