예제 #1
0
        private static object CoerceCursor(DependencyObject o, object value)
        {
            GridSplitter splitter = (GridSplitter)o;

            bool hasModifiers;
            BaseValueSourceInternal vs = splitter.GetValueSource(CursorProperty, null, out hasModifiers);

            if (value == null && vs == BaseValueSourceInternal.Default)
            {
                switch (splitter.GetEffectiveResizeDirection())
                {
                case GridResizeDirection.Columns:
                    return(Cursors.SizeWE);

                case GridResizeDirection.Rows:
                    return(Cursors.SizeNS);
                }
            }
            return(value);
        }
예제 #2
0
        // Token: 0x06004DB8 RID: 19896 RVA: 0x0015EAE8 File Offset: 0x0015CCE8
        private static object CoerceCursor(DependencyObject o, object value)
        {
            GridSplitter            gridSplitter = (GridSplitter)o;
            bool                    flag;
            BaseValueSourceInternal valueSource = gridSplitter.GetValueSource(FrameworkElement.CursorProperty, null, out flag);

            if (value == null && valueSource == BaseValueSourceInternal.Default)
            {
                GridResizeDirection effectiveResizeDirection = gridSplitter.GetEffectiveResizeDirection();
                if (effectiveResizeDirection == GridResizeDirection.Columns)
                {
                    return(Cursors.SizeWE);
                }
                if (effectiveResizeDirection == GridResizeDirection.Rows)
                {
                    return(Cursors.SizeNS);
                }
            }
            return(value);
        }