123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- using System.Text;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Data;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Navigation;
- using System.Windows.Shapes;
- namespace EdgeVoyagerWPF
- {
- /// <summary>
- /// Interaction logic for MainWindow.xaml
- /// </summary>
- public partial class MainWindow : Window
- {
- public MainWindow()
- {
- InitializeComponent();
- }
- private void Bold_Checked(object sender, RoutedEventArgs e)
- {
- textBox1.FontWeight = FontWeights.Bold;
- }
- private void Bold_Unchecked(object sender, RoutedEventArgs e)
- {
- textBox1.FontWeight = FontWeights.Normal;
- }
- private void Italic_Checked(object sender, RoutedEventArgs e)
- {
- textBox1.FontStyle = FontStyles.Italic;
- }
- private void Italic_Unchecked(object sender, RoutedEventArgs e)
- {
- textBox1.FontStyle = FontStyles.Normal;
- }
- private void IncreaseFont_Click(object sender, RoutedEventArgs e)
- {
- if (textBox1.FontSize < 18)
- {
- textBox1.FontSize += 2;
- }
- }
- private void DecreaseFont_Click(object sender, RoutedEventArgs e)
- {
- if (textBox1.FontSize > 10)
- {
- textBox1.FontSize -= 2;
- }
- }
- }
- }
|