public MainWindow()
        {
            InitializeComponent();
            vm = new GraphViewModel();
            DataContext = vm;

            //Set colors used by points
            InputPointColoBrush = this.Resources["InputPointColorBrush"] as SolidColorBrush;
            OutputPointColoBrush = this.Resources["OutputPointColoBrush"] as SolidColorBrush;

            BrushConverter converter = new System.Windows.Media.BrushConverter();

            string inputStrokeColor = converter.ConvertToString(InputPointColoBrush);
            string outputStrokeColor = converter.ConvertToString(OutputPointColoBrush);

            InputStroke = (Brush)converter.ConvertFromString(inputStrokeColor);
            OutputStroke = (Brush)converter.ConvertFromString(outputStrokeColor);
        }
        public MainWindow()
        {
            InitializeComponent();
            vm          = new GraphViewModel();
            DataContext = vm;

            //Set colors used by points
            InputPointColoBrush  = this.Resources["InputPointColorBrush"] as SolidColorBrush;
            OutputPointColoBrush = this.Resources["OutputPointColoBrush"] as SolidColorBrush;

            BrushConverter converter = new System.Windows.Media.BrushConverter();

            string inputStrokeColor  = converter.ConvertToString(InputPointColoBrush);
            string outputStrokeColor = converter.ConvertToString(OutputPointColoBrush);

            InputStroke  = (Brush)converter.ConvertFromString(inputStrokeColor);
            OutputStroke = (Brush)converter.ConvertFromString(outputStrokeColor);
        }
 public TextFormat(double size, FontType ft, FontStyle fs, FontWeight fw, SolidColorBrush brush, bool useUnderline)
 {
     this.FontSize = Math.Round(size, 1);
     this.FontType = ft;
     this.FontFamily = FontFactory.GetFontFamily(ft);
     this.FontStyle = fs;
     this.UseUnderline = useUnderline;
     this.FontWeight = fw;
     this.TextBrush = brush;
     this.TypeFace = new Typeface(FontFamily, fs, fw, FontStretches.Normal, FontFactory.GetFontFamily(FontType.STIXGeneral));
     BrushConverter bc = new BrushConverter();
     TextBrushString = bc.ConvertToString(brush);
 }