ClemensFischer / XAML-Map-Control

XAML Map Control Library
Microsoft Public License
203 stars 59 forks source link

MapScale and Style in Version 4.7.0 #18

Closed MichaelEwe closed 6 years ago

MichaelEwe commented 6 years ago

I think, I have found a small issue with the WPF nuget package. Using a MapScale object and setting its properties like this:

<map:MapScale Foreground="Blue" Stroke="Blue" StrokeThickness="2"/>

image

works as expected. You get a blue label and a blue scale line with a thickness of 2. If you do the same thing with a style like this:

<Style TargetType="map:MapScale" x:Key="S">
     <Setter Property="Stroke" Value="Blue"/>
     <Setter Property="StrokeThickness" Value="2"/>
     <Setter Property="Foreground" Value="Blue"/>
</Style>

<map:MapScale Style="{StaticResource S}"/>

image

you get a blue label, and a line thickness of 2. But the scale line will not be blue. It will render with the Foreground brush of the enclosing Map object.

I really have no clue on this one. Keep up this splendid work!

ClemensFischer commented 6 years ago

Interestingly it does work with a default Style, i.e. one without an x:Key. I'll have a look.

ClemensFischer commented 6 years ago

Fixed with 4.7.1

MichaelEwe commented 6 years ago

You helped me a lot. Thank you very much.