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

            bool newValue = (bool)e.NewValue;

            if (newValue)
            {
                //control.Top = false;
                //control.Center = false;
                //control.Bottom = false;
                control.VerticalAlign = EngineNS.UISystem.VerticalAlignment.Stretch;
            }
        }
Esempio n. 2
0
        public static void OnVerticalAlignChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            VerticalAlignmentEditor control = d as VerticalAlignmentEditor;

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

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

            case EngineNS.UISystem.VerticalAlignment.Bottom:
                control.Bottom = true;
                break;

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