AppBBar按钮。如何将2个glyps作为Icon

问题描述 投票:0回答:1

我有这个

               <AppBarToggleButton Label="" >
                    <AppBarToggleButton.Icon>
                        <FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xEC92;" />
                    </AppBarToggleButton.Icon>
                </AppBarToggleButton>

但我需要添加另一个Glyp与那个重叠。<FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xF0AE;" />我试图添加2个Glips,但我得到一个错误。

               <AppBarToggleButton Label="" >
                    <AppBarToggleButton.Icon>
                        <FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xEC92;" />
                        <FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xF0AE;" />
                    </AppBarToggleButton.Icon>
                </AppBarToggleButton>

有什么方法可以做到吗?

xaml uwp uwp-xaml
1个回答
0
投票

是的,有的。

<AppBarToggleButton Label="" >
    <AppBarToggleButton.Content>
        <Grid>
            <FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xEC92;" />
            <FontIcon FontFamily="Segoe MDL2 Assets" Glyph="&#xF0AE;" />
        </Grid>
    </AppBarToggleButton.Content>
</AppBarToggleButton>
© www.soinside.com 2019 - 2024. All rights reserved.