2 using System
.Collections
.Generic
;
5 using System
.Windows
.Controls
;
6 using System
.Windows
.Data
;
7 using System
.Windows
.Documents
;
8 using System
.Windows
.Input
;
9 using System
.Windows
.Media
;
10 using System
.Windows
.Media
.Imaging
;
11 using System
.Windows
.Shapes
;
14 namespace MenuItemCommands
17 /// Interaction logic for Window1.xaml
20 public partial class Window1
: System
.Windows
.Window
25 InitializeComponent();
29 private void Bold_Checked(object sender
, RoutedEventArgs e
)
31 textBox1
.FontWeight
= FontWeights
.Bold
;
34 private void Bold_Unchecked(object sender
, RoutedEventArgs e
)
36 textBox1
.FontWeight
= FontWeights
.Normal
;
39 private void Italic_Checked(object sender
, RoutedEventArgs e
)
41 textBox1
.FontStyle
= FontStyles
.Italic
;
44 private void Italic_Unchecked(object sender
, RoutedEventArgs e
)
46 textBox1
.FontStyle
= FontStyles
.Normal
;
49 private void IncreaseFont_Click(object sender
, RoutedEventArgs e
)
51 if (textBox1
.FontSize
< 18)
53 textBox1
.FontSize
+= 2;
57 private void DecreaseFont_Click(object sender
, RoutedEventArgs e
)
59 if (textBox1
.FontSize
> 10)
61 textBox1
.FontSize
-= 2;