public static void SetStyleForTextBlock(object sender) { TextBlock Obj = (TextBlock)sender; if (Design.Black() == true) { Obj.Foreground = Design.GetBrush("White"); } else { Obj.Foreground = Design.GetBrush("Black"); } }
private void Image_Loaded(object sender, RoutedEventArgs e) { string url_pvsp; string url_pvsc; if (Design.Black() != true) { url_pvsp = "/Assets/Tiles/player_vs_player_black.png"; url_pvsc = "/Assets/Tiles/player_vs_computer_black.png"; } else { url_pvsp = "/Assets/Tiles/player_vs_player_white.png"; url_pvsc = "/Assets/Tiles/player_vs_computer_white.png"; } Uri imageUri = new Uri(url_pvsp, UriKind.Relative); pvsp.Source = new BitmapImage(imageUri); imageUri = new Uri(url_pvsc, UriKind.Relative); pvsc.Source = new BitmapImage(imageUri); }
private void TextBox_Loaded(object sender, RoutedEventArgs e) { Design.SetStyleForTextBlock(Text); }
private void Text_Loaded(object sender, RoutedEventArgs e) { Design.SetStyleForTextBlock(Text1); Design.SetStyleForTextBlock(Text2); Game1.ShowStat(Text1, Text2); }
private void TextMessages_Loaded(object sender, RoutedEventArgs e) { Design.SetStyleForTextBlock(TextMessages); TextMessages.Text = "X- ваш ход!"; }