2

I want to create an alias that creates static resources to be used in my app.

The problem is when I use an alias parameter as the value for the resource's Key I get an error.

Is there another way to do this?

alias ColorMap(name, color) {
    SolidColorBrush Key=$name { Color: $color }
}

ResourceDictionary {
  @ColorMap("color-bkg", $grey75)
}

The XAML that I'm looking for would look like this:

<SolidColorBrush x:Key="color-bkg" Color="#AFB5BF"/>
4

1 回答 1

1

Good catch!

This will be possible in a next version (any version after Ammy 1.2.41)

于 2017-04-27T08:48:33.537 回答