WinRT通用应用程序:底部栏图标模糊。

时间:2015-09-28 06:41:52

标签: windows-runtime winrt-xaml blur

我在我的windows通用应用程序中使用了76 * 76 png文件作为底栏图标。

下面是我的移动底栏xaml

<Page.BottomAppBar>
    <CommandBar RequestedTheme="Dark" Background="#FFF3A716">
        <AppBarButton x:Uid="AppBarHome" Click="AppBarButton_Click">
            <AppBarButton.Icon>
                <BitmapIcon HorizontalAlignment="Center" VerticalAlignment="Center"   UriSource="/Assets/Images/home-icon.png">

                </BitmapIcon>
            </AppBarButton.Icon>
        </AppBarButton>

    </CommandBar>
</Page.BottomAppBar>

这是我的平板电脑应用程序的底栏:

<Page.BottomAppBar>
    <CommandBar  Name="BtmBar" Closed="CommandBar_Closed" RequestedTheme="Dark" Background="#FFF3A716" IsOpen="True" IsSticky="True">
        <AppBarButton x:Uid="AppBarHome" Click="AppBarButton_Click">
            <AppBarButton.Icon>
                <BitmapIcon HorizontalAlignment="Center" VerticalAlignment="Center"   UriSource="/Assets/Images/home-icon2.png">

                </BitmapIcon>
            </AppBarButton.Icon>
        </AppBarButton>

    </CommandBar>
</Page.BottomAppBar>

home-icon为76 * 76,home-icon2为96 * 96。 我已经尝试了76 * 76图标,但在手机中似乎没问题,在平板电脑中它很模糊。

如何解决这个模糊的问题?

1 个答案:

答案 0 :(得分:1)

你必须制作多个比例并让Windows -auto-选择一个完美的比例..这个图像可以帮助你:http://i.stack.imgur.com/x2yGW.jpg

参考:AppBar button icon not fitting inside elipse

缩放参考:How to create multi scaled image assets for a WP 8.1 Store app