protected override void InvalidatePadding(PaddingName paddingName, byte newValue) { if (_myTextRun == null) { return; } // switch (paddingName) { case PaddingName.Left: _myTextRun.PaddingLeft = newValue; break; case PaddingName.Top: _myTextRun.PaddingTop = newValue; break; case PaddingName.Right: _myTextRun.PaddingRight = newValue; break; case PaddingName.Bottom: _myTextRun.PaddingBottom = newValue; break; case PaddingName.AllSide: _myTextRun.SetPaddings(this.PaddingLeft, this.PaddingTop, this.PaddingRight, this.PaddingBottom); break; case PaddingName.AllSideSameValue: _myTextRun.SetPaddings(newValue); break; } }
protected override void InvalidatePadding(PaddingName paddingName, ushort newValue) { if (_myTextRun == null) { return; } // switch (paddingName) { case PaddingName.Left: _myTextRun.PaddingLeft = newValue; break; case PaddingName.Top: _myTextRun.PaddingTop = newValue; break; case PaddingName.Right: _myTextRun.PaddingRight = newValue; break; case PaddingName.Bottom: _myTextRun.PaddingBottom = newValue; break; case PaddingName.AllSide: //for Label, padding is limit to 0-255 _myTextRun.SetPaddings((byte)this.PaddingLeft, (byte)this.PaddingTop, (byte)this.PaddingRight, (byte)this.PaddingBottom); break; case PaddingName.AllSideSameValue: //for Label, padding is limit to 0-255 _myTextRun.SetPaddings((byte)newValue); break; } }
//--------------------------------------------------------------- protected virtual void InvalidatePadding(PaddingName paddingName, ushort newValue) { }
//--------------------------------------------------------------- protected virtual void InvalidatePadding(PaddingName paddingName, byte newValue) { }