【发布时间】:2019-04-26 09:25:38
【问题描述】:
我有:
<CommandBar ..>
..
<CommandBar.PrimaryCommands>
<AppBarButton Name="btnStop" ToolTipService.ToolTip="btnStop">
<FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="" Foreground="Red"/>
</AppBarButton>
</CommandBar.PrimaryCommands>
</CommandBar>
有什么方法可以让图标居中对齐吗? 如果我在“实时资源管理器属性”中设置 本地 -> 图标 -> 讲义视觉 -> 偏移 = 它看起来更好。如何在代码中做同样的事情?
【问题讨论】:
-
您的标记对我有用 - 它是水平对齐的。也许您有一个全局样式干扰了 appbarbutton,它正在为您向左移动?
-
@Mark W,非常感谢您的回答。我会尝试在我自己的代码中找到问题。
标签: xaml button uwp commandbar