Exemple #1
0
 public UIRectMessage(UIRect uiRect)
     : base(uiRect)
 {
     Alpha         = uiRect.alpha;
     UpdateAnchors = uiRect.updateAnchors;
     LeftAnchor    = uiRect.LeftAnchorPosition;
     RightAnchor   = uiRect.RightAnchorPosition;
     BottomAnchor  = uiRect.BottomAnchorPosition;
     TopAnchor     = uiRect.TopAnchorPosition;
 }
        private void AbsoluteChanged(Object sender, RoutedPropertyChangedEventArgs <Object> e)
        {
            if (e.NewValue == null)
            {
                throw new ArgumentException("NewValue");
            }

            _disableCallback = true;
            Value            = new UIRect.Position(Value.Relative, (Int32)e.NewValue);
            _disableCallback = false;
        }
Exemple #3
0
        public override void Deserialize(BinaryReader br)
        {
            base.Deserialize(br);

            Alpha         = br.ReadSingle();
            UpdateAnchors = (UIRect.AnchorUpdate)br.ReadInt32();
            LeftAnchor    = UIRect.Position.Read(br);
            RightAnchor   = UIRect.Position.Read(br);
            BottomAnchor  = UIRect.Position.Read(br);
            TopAnchor     = UIRect.Position.Read(br);
        }
        private static void OnValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            UiRectPositionControl self = (UiRectPositionControl)d;

            if (self._disableCallback)
            {
                return;
            }

            UIRect.Position position = (UIRect.Position)e.NewValue;
            self._relative.Value = position.Relative;
            self._absolute.Value = position.Absolute;
        }
 public void Deserialize(BinaryReader br)
 {
     Value = UIRect.Position.Read(br);
 }
 public UiRectPositionMessage(UIRect.Position value)
 {
     Value = value;
 }