次のAppBarがあります。
<Page.BottomAppBar>
<AppBar x:Name="bottomAppBar" Padding="10,0,10,0">
<Grid>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<Button x:Name="switchMeasurementMode" AutomationProperties.Name = "Breath rate" Style="{StaticResource AppBarButtonStyle}" Click="switchMeasurementMode_Click" />
</StackPanel>
</Grid>
</AppBar>
</Page.BottomAppBar>
このように見えます
次の C# コードを使用して、実行時にテキストを変更する傾向があります
private void switchMeasurementMode_Click(object sender, RoutedEventArgs e)
{
this.switchMeasurementMode.Name = "111";
}
ただし、ボタンのテキストは変更されません。私が見逃したものはありますか?