Windows Phone Runtime pathicon runtime vs designtime

I am working on a WP8.1 runtime app (using generic app template). I created an app bar using a switcher. The button icon is the PathIcon.

at design time (both Blend and VS2013) the button looks exactly what I expect, but at run time the path stretches so it fills the circle of the button.

Is this difference between design time and runtime a known issue and is there a workaround to make my button look the way it should look at runtime?

It looks good at every resolution in Blend, so it's not a scaling issue.

development time: designtime

lead time: runtime

XAML for the button:

<Page.BottomAppBar>
<CommandBar>
    <AppBarToggleButton Label="HQ">
        <AppBarToggleButton.Icon>
            <PathIcon HorizontalAlignment="Left"
                        VerticalAlignment="Top"
                        Data="M21.0007,6.25 C6.3752,1.125 5.25043,16.6091 5.62518,19.5 C5.9215,21.7858 6.25018,10.75 16.0005,12.875 C19.8337,13.7104 24.1247,19.3755 20.3747,23.0006 C20.1689,23.1995 18.7133,17.0212 13.6254,19.5002 C8.75026,21.8755 13.0958,28.4331 12.8234,28.4006 C5.88184,27.5722 0.5,21.6646 0.5,14.5 C0.5,6.76801 6.76801,0.5 14.5,0.5 C19.153,0.5 23.0847,2.9988 25.2497,6.50016 C25.7361,7.28663 25.9271,7.98672 26.2501,8.87522 C26.75,10.2503 22.9202,6.92261 21.0007,6.25 z" />
        </AppBarToggleButton.Icon>
    </AppBarToggleButton>
</CommandBar>

      

+3


source to share


1 answer


I haven't tested PathIcon, but you can just Path just fine:



<CommandBar>
    <AppBarToggleButton Label="HQ">
        <Path VerticalAlignment="Center" HorizontalAlignment="Center" 
              Fill="White" Stroke="White" 
              Data="M21.0007,6.25 C6.3752,1.125 5.25043,16.6091 5.62518,19.5 C5.9215,21.7858 6.25018,10.75 16.0005,12.875 C19.8337,13.7104 24.1247,19.3755 20.3747,23.0006 C20.1689,23.1995 18.7133,17.0212 13.6254,19.5002 C8.75026,21.8755 13.0958,28.4331 12.8234,28.4006 C5.88184,27.5722 0.5,21.6646 0.5,14.5 C0.5,6.76801 6.76801,0.5 14.5,0.5 C19.153,0.5 23.0847,2.9988 25.2497,6.50016 C25.7361,7.28663 25.9271,7.98672 26.2501,8.87522 C26.75,10.2503 22.9202,6.92261 21.0007,6.25 z" />
    </AppBarToggleButton>
</CommandBar>

      

+1


source







All Articles