Browse Source
* Add LetterSpacing property to the Button * Created attached property * Added samples * Updated implementation * Updated Themes * Updated ButtonPage LetterSpacing sample * Updated templates * Updated APIfixes/effect-clip-rect
committed by
GitHub
17 changed files with 467 additions and 24 deletions
@ -0,0 +1,37 @@ |
|||||
|
using Avalonia.UnitTests; |
||||
|
using Xunit; |
||||
|
|
||||
|
namespace Avalonia.Controls.UnitTests |
||||
|
{ |
||||
|
public class CheckBoxTests : ScopedTestBase |
||||
|
{ |
||||
|
[Fact] |
||||
|
public void CheckBox_LetterSpacing_Default_Value_Is_Zero() |
||||
|
{ |
||||
|
var checkBox = new CheckBox(); |
||||
|
Assert.Equal(0, checkBox.LetterSpacing); |
||||
|
} |
||||
|
|
||||
|
[Fact] |
||||
|
public void CheckBox_LetterSpacing_Can_Be_Set_And_Retrieved() |
||||
|
{ |
||||
|
var checkBox = new CheckBox { LetterSpacing = 2.5 }; |
||||
|
Assert.Equal(2.5, checkBox.LetterSpacing); |
||||
|
} |
||||
|
|
||||
|
[Fact] |
||||
|
public void CheckBox_LetterSpacing_Inherits_From_TemplatedControl() |
||||
|
{ |
||||
|
var checkBox = new CheckBox { LetterSpacing = 3.0 }; |
||||
|
// LetterSpacing is inherited from TemplatedControl
|
||||
|
Assert.Equal(3.0, checkBox.LetterSpacing); |
||||
|
} |
||||
|
|
||||
|
[Fact] |
||||
|
public void CheckBox_LetterSpacing_Can_Be_Negative() |
||||
|
{ |
||||
|
var checkBox = new CheckBox { LetterSpacing = -1.5 }; |
||||
|
Assert.Equal(-1.5, checkBox.LetterSpacing); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,37 @@ |
|||||
|
using Avalonia.UnitTests; |
||||
|
using Xunit; |
||||
|
|
||||
|
namespace Avalonia.Controls.UnitTests |
||||
|
{ |
||||
|
public class LabelTests : ScopedTestBase |
||||
|
{ |
||||
|
[Fact] |
||||
|
public void Label_LetterSpacing_Default_Value_Is_Zero() |
||||
|
{ |
||||
|
var label = new Label(); |
||||
|
Assert.Equal(0, label.LetterSpacing); |
||||
|
} |
||||
|
|
||||
|
[Fact] |
||||
|
public void Label_LetterSpacing_Can_Be_Set_And_Retrieved() |
||||
|
{ |
||||
|
var label = new Label { LetterSpacing = 2.5 }; |
||||
|
Assert.Equal(2.5, label.LetterSpacing); |
||||
|
} |
||||
|
|
||||
|
[Fact] |
||||
|
public void Label_LetterSpacing_Inherits_From_TemplatedControl() |
||||
|
{ |
||||
|
var label = new Label { LetterSpacing = 3.0 }; |
||||
|
// LetterSpacing is inherited from TemplatedControl
|
||||
|
Assert.Equal(3.0, label.LetterSpacing); |
||||
|
} |
||||
|
|
||||
|
[Fact] |
||||
|
public void Label_LetterSpacing_Can_Be_Negative() |
||||
|
{ |
||||
|
var label = new Label { LetterSpacing = -1.5 }; |
||||
|
Assert.Equal(-1.5, label.LetterSpacing); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue