using System;
using System.Collections.Generic;
using System.Linq;
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.Shapes;

namespace Windowanwendung
{
    /// <summary>
    /// Interaktionslogik für Dialog1.xaml
    /// </summary>
    public partial class Dialog1 : Window
    {
        Brush backgroundColor;
        Brush foregroundColor;

        public Dialog1()
        {
            InitializeComponent();
            backgroundColor = Brushes.White;
            backgroundColor = Brushes.Black;
        }

        private void btnOk_Click(object sender, RoutedEventArgs e)
        {
            if (radioButton1.IsChecked == true)
                foregroundColor = Brushes.Black;
            if (radioButton2.IsChecked == true)
                foregroundColor = Brushes.White;
            if (radioButton3.IsChecked == true)
                foregroundColor = Brushes.Red;

            if (radioButton4.IsChecked == true)
                backgroundColor = Brushes.Black;
            if (radioButton5.IsChecked == true)
                backgroundColor = Brushes.White;
            if (radioButton6.IsChecked == true)
                backgroundColor = Brushes.Red;

            this.DialogResult = true;
        }
        private void btnCancel_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = false;
        }

        public Brush BackgroundColor
        {
            get { return backgroundColor; }
        }

        public Brush ForegroundColor
        {
            get { return foregroundColor; }
        }
    }
}
