Beispiel #1
0
 public WindowRestoreButton(BlendWindow window1)
 {
     window = window1;
     p      = new Path
     {
         Data                  = Geometry.Parse("M 0,3L 3,3L 3,0L 10,0L 10,7L 7,7L 7,10L 0,10 Z M 8,2L 5,2L 5,3L 7,3L 7, 5L 8, 5 Z M 2,5L 2, 8L 5, 8L 5,5 ZM 0,3L 3,3L 3,0L 10,0L 10,7L 7,7L 7,10L 0,10 Z M 8,2L 5,2L 5,3L 7,3L 7, 5L 8, 5 Z M 2,5L 2, 8L 5, 8L 5,5 Z"),
         Fill                  = window.TitleBarButtonForeground,
         Stroke                = window.TitleBarButtonBorder,
         StrokeThickness       = 1,
         RenderTransformOrigin = new Point(0.5, 0.5),
         LayoutTransform       = new ScaleTransform(1, 1),
         Stretch               = Stretch.Fill,
         Width                 = 11,
         Height                = 11
     };
     Content         = p;
     ContentDisabled = p;
     Foreground      = window.TitleBarButtonForeground;
     Background      = window.TitleBarButtonBackground;
 }
 public WindowMaximizeButton(BlendWindow window1)
 {
     window = window1;
     p      = new Path
     {
         Data                  = Geometry.Parse("M 1,3 L 11,3 L 11,11 L 1,11 Z M 0,0 L 12,0 L12,12 L 0,12 ZM 1,3 L 11,3 L 11,11 L 1,11 Z M 0,0 L 12,0 L12,12 L 0,12 Z"),
         Fill                  = window.TitleBarButtonForeground,
         Stroke                = window.TitleBarButtonBorder,
         StrokeThickness       = 1,
         RenderTransformOrigin = new Point(0.5, 0.5),
         LayoutTransform       = new ScaleTransform(1, 1),
         Stretch               = Stretch.Fill,
         Width                 = 10,
         Height                = 10
     };
     Content         = p;
     ContentDisabled = p;
     Foreground      = window.TitleBarButtonForeground;
     Background      = window.TitleBarButtonBackground;
 }
 public WindowMinimizeButton(BlendWindow window1)
 {
     window = window1;
     p      = new Path
     {
         Data                  = Geometry.Parse("M0,0 L8,0 8,1 8,2 0,2 0,1 z"),
         Fill                  = window.TitleBarButtonForeground,
         Stroke                = window.TitleBarButtonBorder,
         StrokeThickness       = 1,
         RenderTransformOrigin = new Point(0.5, 0.5),
         LayoutTransform       = new ScaleTransform(1, 1),
         Stretch               = Stretch.Fill,
         VerticalAlignment     = VerticalAlignment.Bottom,
         Width                 = 15,
         Height                = 3,
         Margin                = new Thickness(3)
     };
     Content         = p;
     ContentDisabled = p;
     CornerRadius    = new CornerRadius(3, 0, 0, 3);
     Enable();
 }
Beispiel #4
0
        public WindowCloseButton(BlendWindow window1)
        {
            window     = window1;
            this.Width = 30;

            p = new Path
            {
                Data                  = Geometry.Parse("M 7.070,5.657 L 4.949,3.535 L 7.070,1.414 L 5.656,0.000 L 3.535,2.121 L 1.414,0.001 L 0.000,1.415 L 2.121,3.535 L 0.000,5.656 L 1.414,7.071 L 3.535,4.950 L 5.656,7.071 ZM 7.070,5.657 L 4.949,3.535 L 7.070,1.414 L 5.656,0.000 L 3.535,2.121 L 1.414,0.001 L 0.000,1.415 L 2.121,3.535 L 0.000,5.656 L 1.414,7.071 L 3.535,4.950 L 5.656,7.071 Z"),
                Fill                  = window.TitleBarButtonForeground,
                Stroke                = window.TitleBarButtonBorder,
                StrokeThickness       = 1,
                RenderTransformOrigin = new Point(0.5, 0.5),
                LayoutTransform       = new ScaleTransform(1, 1),
                Stretch               = Stretch.Fill,
                Width                 = 16,
                Height                = 13
            };
            Content           = p;
            ContentDisabled   = p;
            Foreground        = window.TitleBarButtonForeground;
            Background        = window.TitleBarButtonBackground;
            this.CornerRadius = new CornerRadius(0, 3, 3, 0);
        }