public void SetValuesFrom(SpriteFrame spriteFrame) { Texture = spriteFrame.Texture; SpriteBorderWidth = spriteFrame.SpriteBorderWidth; TextureBorderWidth = spriteFrame.TextureBorderWidth; Alpha = spriteFrame.Alpha; BorderSides = spriteFrame.Borders; }
private void OnBordersChanged(Window callingWindow) { SpriteFrame.BorderSides borderSides = SelectedObject.Borders; if (IsAsymmetric) { // Since the SpriteFrame doesn't use symmetrical BorderSides, we can set the allowed texture coords // to 1 instead of .5 UpDown upDown = GetUIElementForMember("TextureBorderWidth") as UpDown; upDown.MaxValue = 1; } else { // This is symmetrical, so we can't allow the texture border width to be bigger than .5 UpDown upDown = GetUIElementForMember("TextureBorderWidth") as UpDown; upDown.MaxValue = .5f; } }