login.xaml鏈接的TextBlock和TextBox在C#中的XAML
<TextBox x:Name="player1" HorizontalAlignment="Left" Margin="544,280,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="44" Width="280" CacheMode="BitmapCache" FontFamily="Century Schoolbook" FontSize="26">
<TextBox.Foreground>
<SolidColorBrush Color="White" />
</TextBox.Foreground>
<TextBox.Background>
<SolidColorBrush Color="#FF1EA600" Opacity="0.645"/>
</TextBox.Background>
</TextBox>
現在我想轉由用戶提供的名稱,以文本塊,以便它可以更改默認的名稱是「玩家1個回合」
MainPage.xaml中
<TextBlock x:Name="playerTurn" TextWrapping="Wrap" Text="Player 1 Turn" VerticalAlignment="Top" Height="70" FontSize="50"
Foreground="Cyan" TextAlignment="Center" FontFamily="Century Gothic" />
因此,因此我創造了兩個不同的頁面文件是「 login.xaml'&'MainPage.xaml'但我無法訪問用戶輸入數據到文本塊!
你是如何將值傳遞給主頁? –
使用查詢字符串。谷歌!谷歌!!谷歌!!! – niksofteng
這是我想知道如何將值從「登錄」傳遞給MainPage.xaml – Ethical