Beispiel #1
0
            // Methods
            public PreviewAdorner(CustomGridSplitter CustomGridSplitter, Style previewStyle)
                : base(CustomGridSplitter)
            {
                Control control = new Control();

                control.Style                   = previewStyle;
                control.IsEnabled               = false;
                this.Translation                = new TranslateTransform();
                this._decorator                 = new Decorator();
                this._decorator.Child           = control;
                this._decorator.RenderTransform = this.Translation;
                base.AddVisualChild(this._decorator);
            }
Beispiel #2
0
        private static object CoerceCursor(DependencyObject o, object value)
        {
            CustomGridSplitter splitter = (CustomGridSplitter)o;

            switch (splitter.GetEffectiveResizeDirection())
            {
            case GridResizeDirection.Columns:
                return(Cursors.SizeWE);

            case GridResizeDirection.Rows:
                return(Cursors.SizeNS);
            }
            return(value);
        }