Пример #1
0
        public void MergeInto(UIResizeResult otherResult)
        {
            if (otherResult == null)
            {
                return;
            }

            if (otherResult.ResizeCommand != null && (otherResult.IsResizeCommandScoped || (!otherResult.IsResizeCommandScoped && !IsResizeCommandScoped)))
            {
                ResizeCommand         = otherResult.ResizeCommand;
                IsResizeCommandScoped = otherResult.IsResizeCommandScoped;
            }

            if (otherResult.AutoResizeCommand != null && (otherResult.IsAutoResizeCommandScoped || (!otherResult.IsAutoResizeCommandScoped && !IsAutoResizeCommandScoped)))
            {
                AutoResizeCommand         = otherResult.AutoResizeCommand;
                IsAutoResizeCommandScoped = otherResult.IsAutoResizeCommandScoped;
            }

            if (otherResult.LineSpacingCommand != null && (otherResult.IsLineSpacingCommandScoped || (!otherResult.IsLineSpacingCommandScoped && !IsLineSpacingCommandScoped)))
            {
                LineSpacingCommand         = otherResult.LineSpacingCommand;
                IsLineSpacingCommandScoped = otherResult.IsLineSpacingCommandScoped;
            }

            if (otherResult.HorizontalOverflowCommand != null && (otherResult.IsHorizontalOverflowCommandScoped || (!otherResult.IsHorizontalOverflowCommandScoped && !IsHorizontalOverflowCommandScoped)))
            {
                HorizontalOverflowCommand         = otherResult.HorizontalOverflowCommand;
                IsHorizontalOverflowCommandScoped = otherResult.IsHorizontalOverflowCommandScoped;
            }

            if (otherResult.VerticalOverflowCommand != null && (otherResult.IsVerticalOverflowCommandScoped || (!otherResult.IsVerticalOverflowCommandScoped && !IsVerticalOverflowCommandScoped)))
            {
                VerticalOverflowCommand         = otherResult.VerticalOverflowCommand;
                IsVerticalOverflowCommandScoped = otherResult.IsVerticalOverflowCommandScoped;
            }

            if (otherResult.OverflowCommand != null && (otherResult.IsOverflowCommandScoped || (!otherResult.IsOverflowCommandScoped && !IsOverflowCommandScoped)))
            {
                OverflowCommand         = otherResult.OverflowCommand;
                IsOverflowCommandScoped = otherResult.IsOverflowCommandScoped;
            }

            if (otherResult.AlignmentCommand != null && (otherResult.IsAlignmentCommandScoped || (!otherResult.IsAlignmentCommandScoped && !IsAlignmentCommandScoped)))
            {
                AlignmentCommand         = otherResult.AlignmentCommand;
                IsAlignmentCommandScoped = otherResult.IsAlignmentCommandScoped;
            }
        }
Пример #2
0
        public void MergeInto(UIResizeResult otherResult)
        {
            if (otherResult == null)
            {
                return;
            }

            if (otherResult.ResizeCommand != null && (otherResult.IsResizeCommandScoped || (!otherResult.IsResizeCommandScoped && !IsResizeCommandScoped)))
            {
                ResizeCommand = otherResult.ResizeCommand;
            }

            if (otherResult.AutoResizeCommand != null && (otherResult.IsAutoResizeCommandScoped || (!otherResult.IsAutoResizeCommandScoped && !IsAutoResizeCommandScoped)))
            {
                AutoResizeCommand = otherResult.AutoResizeCommand;
            }

            if (otherResult.LineSpacingCommand != null && (otherResult.IsLineSpacingCommandScoped || (!otherResult.IsLineSpacingCommandScoped && !IsLineSpacingCommandScoped)))
            {
                LineSpacingCommand = otherResult.LineSpacingCommand;
            }
        }