Example #1
0
		public FrameBackend()
		{
			ExGrid grid = new ExGrid();
			grid.Children.Add (this.groupBox = new SWC.GroupBox ());
			grid.Children.Add (this.flippedGroupBox = new SWC.GroupBox ());
			groupBox.SizeChanged += delegate (object sender, SizeChangedEventArgs e)
			{
				flippedGroupBox.RenderSize = groupBox.RenderSize;
			};

			this.flippedGroupBox.SetBinding (UIElement.IsEnabledProperty, new Binding ("IsEnabled") { Source = this.groupBox });
			this.flippedGroupBox.SetBinding (Control.BorderBrushProperty, new Binding ("BorderBrush") { Source = this.groupBox });
			this.flippedGroupBox.SetBinding (Control.BorderThicknessProperty,
				new Binding ("BorderThickness") {
					Source = this.groupBox,
					Converter =  new HFlippedBorderThicknessConverter ()
				});

			this.flippedGroupBox.RenderTransformOrigin = new System.Windows.Point (0.5, 0.5);
			this.flippedGroupBox.RenderTransform = new ScaleTransform (-1, 1);
			this.flippedGroupBox.Focusable = false;
			SWC.Panel.SetZIndex (this.flippedGroupBox, -1);

			Widget = grid;
		}
Example #2
0
        public FrameBackend()
        {
            ExGrid grid = new ExGrid();

            grid.Children.Add(this.groupBox        = new SWC.GroupBox());
            grid.Children.Add(this.flippedGroupBox = new SWC.GroupBox());
            groupBox.SizeChanged += delegate(object sender, SizeChangedEventArgs e)
            {
                flippedGroupBox.RenderSize = groupBox.RenderSize;
            };

            this.flippedGroupBox.SetBinding(UIElement.IsEnabledProperty, new Binding("IsEnabled")
            {
                Source = this.groupBox
            });
            this.flippedGroupBox.SetBinding(Control.BorderBrushProperty, new Binding("BorderBrush")
            {
                Source = this.groupBox
            });
            this.flippedGroupBox.SetBinding(Control.BorderThicknessProperty,
                                            new Binding("BorderThickness")
            {
                Source    = this.groupBox,
                Converter = new HFlippedBorderThicknessConverter()
            });

            this.flippedGroupBox.RenderTransformOrigin = new System.Windows.Point(0.5, 0.5);
            this.flippedGroupBox.RenderTransform       = new ScaleTransform(-1, 1);
            this.flippedGroupBox.Focusable             = false;
            SWC.Panel.SetZIndex(this.flippedGroupBox, -1);

            Widget = grid;
        }
Example #3
0
        public FrameBackend()
        {
            ExGrid grid = new ExGrid();
            grid.Children.Add (this.groupBox = new SWC.GroupBox ());
            grid.Children.Add (this.flippedGroupBox = new SWC.GroupBox ());

            this.flippedGroupBox.SetBinding (FrameworkElement.WidthProperty, new Binding ("ActualWidth") { Source = this.groupBox });
            this.flippedGroupBox.SetBinding (FrameworkElement.HeightProperty, new Binding ("ActualHeight") { Source = this.groupBox });
            this.flippedGroupBox.SetBinding (UIElement.IsEnabledProperty, new Binding ("IsEnabled") { Source = this.groupBox });
            this.flippedGroupBox.SetBinding (Control.BorderBrushProperty, new Binding ("BorderBrush") { Source = this.groupBox });
            this.flippedGroupBox.SetBinding (Control.BorderThicknessProperty,
                new Binding ("BorderThickness") {
                    Source = this.groupBox,
                    Converter =  new HFlippedBorderThicknessConverter ()
                });

            this.flippedGroupBox.RenderTransformOrigin = new System.Windows.Point (0.5, 0.5);
            this.flippedGroupBox.RenderTransform = new ScaleTransform (-1, 1);
            this.flippedGroupBox.Focusable = false;
            SWC.Panel.SetZIndex (this.flippedGroupBox, -1);

            Widget = grid;
        }
Example #4
0
        public FrameBackend()
        {
            ExGrid grid = new ExGrid();

            grid.Children.Add(this.groupBox        = new SWC.GroupBox());
            grid.Children.Add(this.flippedGroupBox = new SWC.GroupBox());

            this.flippedGroupBox.SetBinding(FrameworkElement.WidthProperty, new Binding("ActualWidth")
            {
                Source = this.groupBox
            });
            this.flippedGroupBox.SetBinding(FrameworkElement.HeightProperty, new Binding("ActualHeight")
            {
                Source = this.groupBox
            });
            this.flippedGroupBox.SetBinding(UIElement.IsEnabledProperty, new Binding("IsEnabled")
            {
                Source = this.groupBox
            });
            this.flippedGroupBox.SetBinding(Control.BorderBrushProperty, new Binding("BorderBrush")
            {
                Source = this.groupBox
            });
            this.flippedGroupBox.SetBinding(Control.BorderThicknessProperty,
                                            new Binding("BorderThickness")
            {
                Source    = this.groupBox,
                Converter = new HFlippedBorderThicknessConverter()
            });

            this.flippedGroupBox.RenderTransformOrigin = new System.Windows.Point(0.5, 0.5);
            this.flippedGroupBox.RenderTransform       = new ScaleTransform(-1, 1);
            this.flippedGroupBox.Focusable             = false;
            SWC.Panel.SetZIndex(this.flippedGroupBox, -1);

            Widget = grid;
        }