Open.Core.Controls.Buttons.ButtonView.SyncDimension C# (CSharp) Метод

SyncDimension() защищенный Метод

Syncs the specified of the button with the model (if it has size values. See 'NoSize' constant).
protected SyncDimension ( SizeDimension dimension ) : void
dimension SizeDimension The size dimension to sync.
Результат void
        protected void SyncDimension(SizeDimension dimension)
        {
            // Setup initial conditions.
            ISize size = Model as ISize;
            if (size == null) return;

            // Width.
            if (dimension == SizeDimension.Width)
            {
                if (size.Width != ButtonModel.NoSize) Width = size.Width;
            }

            // Height.
            if (dimension == SizeDimension.Height)
            {
                if (size.Height != ButtonModel.NoSize) Height = size.Height;
            }
        }
        #endregion