Ejemplo n.º 1
0
        public PlotPanel() : base()
        {
            ClipToBounds = true;
            // Add Canvas objects
            this.Background  = Brushes.White; this.HorizontalAlignment = HorizontalAlignment.Center; this.VerticalAlignment = VerticalAlignment.Center;
            Canvas           = new Canvas();
            BackgroundCanvas = new Canvas();
            this.Children.Add(Canvas);
            this.Children.Add(BackgroundCanvas);
            //
            Canvas.ClipToBounds = true;
            Canvas.SetValue(Grid.ZIndexProperty, 100);
            BackgroundCanvas.SetValue(Grid.ZIndexProperty, 50);
            Axes = new Axes2D(this);

            //LinearGradientBrush background = new LinearGradientBrush();
            //background.StartPoint = new Point(0, 0); background.EndPoint = new Point(1, 1);
            //background.GradientStops.Add(new GradientStop(Colors.White, 0.0));
            //background.GradientStops.Add(new GradientStop(Colors.LightGray, 1.0));
            Canvas.Background           = Brushes.Transparent;
            BackgroundCanvas.Background = Brushes.White;
            direct2DControl             = null;
            //
            if (!(this is ColourBarPanel))
            {
                this.AddInteractionEvents();
            }
            this.AddSelectionRectangle();
            this.InitialiseChildenCollection();
            marginChangeTimer = new DispatcherTimer(TimeSpan.FromSeconds(0.0), DispatcherPriority.Normal, marginChangeTimer_Tick, this.Dispatcher);
        }
Ejemplo n.º 2
0
        public PlotPanel() : base()
        {
            ClipToBounds = true;
            // Add Canvas objects
            this.Background = Brushes.White; this.HorizontalAlignment = HorizontalAlignment.Center; this.VerticalAlignment = VerticalAlignment.Center;
            Canvas = new Canvas();
            BackgroundCanvas = new Canvas();
            this.Children.Add(Canvas);
            this.Children.Add(BackgroundCanvas);
            //
            Canvas.ClipToBounds = true;
            Canvas.SetValue(Grid.ZIndexProperty, 100);
            BackgroundCanvas.SetValue(Grid.ZIndexProperty, 50);
            Axes = new Axes2D(this);

            //LinearGradientBrush background = new LinearGradientBrush();
            //background.StartPoint = new Point(0, 0); background.EndPoint = new Point(1, 1);
            //background.GradientStops.Add(new GradientStop(Colors.White, 0.0));
            //background.GradientStops.Add(new GradientStop(Colors.LightGray, 1.0));
            Canvas.Background = Brushes.Transparent;
            BackgroundCanvas.Background = Brushes.White;
            direct2DControl = null;
            //
            if (!(this is ColourBarPanel)) this.AddInteractionEvents();
            this.AddSelectionRectangle();
            this.InitialiseChildenCollection();
            marginChangeTimer = new DispatcherTimer(TimeSpan.FromSeconds(0.0), DispatcherPriority.Normal, marginChangeTimer_Tick, this.Dispatcher);
        }