public fontChooser(addText tAdd, bool isUpdate) { InitializeComponent(); fontCombo.ItemsSource = Fonts.SystemFontFamilies; updating = isUpdate; t_Cur = tAdd; t_Cur.textBox1.FontFamily = new FontFamily(); t_Cur.textBox1.FontSize = 12; }
public fontChooser(addText tAdd, bool isUpdate) { InitializeComponent(); fontCombo.ItemsSource = Fonts.SystemFontFamilies; updating = isUpdate; t_Cur = tAdd; if (t_Cur.textBox1.Text == null) { t_Cur.textBox1.FontFamily = new FontFamily(); Console.WriteLine("I AM HERE"); //t_Cur.textBox1.FontSize = 12; } else { this.slider1.Value = (int)((t_Cur.textBox1.FontSize - 1) / 10); this.fontCombo.SelectedItem = t_Cur.textBox1.FontFamily; textBlock1.FontSize = t_Cur.textBox1.FontSize; this.label4.Content = textBlock1.FontSize; this.textBlock1.FontFamily = t_Cur.textBox1.FontFamily; this.textBlock1.Foreground = t_Cur.textBox1.Foreground; } }
private void Add_Text(object sender, RoutedEventArgs e) { addText at = new addText(this); at.ShowDialog(); }