Exemplo n.º 1
0
        public static void OnStretchChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            HorizontalAlignmentEditor control = d as HorizontalAlignmentEditor;

            bool newValue = (bool)e.NewValue;

            if (newValue)
            {
                //control.Left = false;
                //control.Center = false;
                //control.Right = false;
                control.HorizontalAlign = EngineNS.UISystem.HorizontalAlignment.Stretch;
            }
        }
Exemplo n.º 2
0
        public static void OnHorizontalAlignChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            HorizontalAlignmentEditor control = d as HorizontalAlignmentEditor;

            EngineNS.UISystem.HorizontalAlignment newValue = (EngineNS.UISystem.HorizontalAlignment)e.NewValue;
            switch (newValue)
            {
            case EngineNS.UISystem.HorizontalAlignment.Left:
                control.Left = true;
                break;

            case EngineNS.UISystem.HorizontalAlignment.Right:
                control.Right = true;
                break;

            case EngineNS.UISystem.HorizontalAlignment.Center:
                control.Center = true;
                break;

            case EngineNS.UISystem.HorizontalAlignment.Stretch:
                control.Stretch = true;
                break;
            }
        }