windows - 如何使用 XAML 使用字符串资源设置 AppBarButton 文本
问题描述
有没有办法将字符串资源设置为 AppBarButton 的文本,而不必以编程方式进行?下面使用的方法由于某种原因不起作用。
<Page>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<CommandBar>
<CommandBar.Content>
<Button
Style="{StaticResource NavigationBackButtonNormalStyle}"
Name="BackButton"
VerticalAlignment="Top"
Click="Back_Click"/>
</CommandBar.Content>
<AppBarButton Name="HelloWorld" x:Uid="HelloWorld">
<AppBarButton.Icon>
<FontIcon Glyph=""/>
</AppBarButton.Icon>
</AppBarButton>
</CommandBar>
<Frame Name="MyFrame"/>
</Grid>
</Page>
解决方案
推荐阅读
- coq - 如何证明从典型类型到“Prop”的所有函数 P、Q,“forall a, b, P(a) or Q(b) 成立”当且仅当“forall a, P(a), or, forall b, Q (b), 持有”?
- c# - 即使服务器关闭,Identity Server 4 客户端也能正常工作
- solr - 将单个 solr facet 字段分组到范围或存储桶中
- c++ - 想要检查模板化参数是否为 std::endl
- angular - 如何等待一个可观察的循环
- python - 无服务器和 python:未将包添加到 zip 以进行部署
- spring - 如何使用 Spring Boot 自动释放 8080 端口
- java - 如何在 Java 中生成唯一的 Long
- python - 如何在 Python 中创建一个简单的输入数学验证码?
- anylogic - 一旦代理通过任何块,如何将单个代理编号传输到变量?