Skip to content

Commit 15ca8c8

Browse files
author
Pavel Kovalenko
committed
Add TextAlign property for ColorPicker control.
1 parent 99fa180 commit 15ca8c8

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/editors/xrSdkControls/Controls/ColorPicker/ColorPicker.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public sealed partial class ColorPicker : UserControl
1313
private bool hexadecimal;
1414
private bool ignoreOnChanged = false;
1515
private bool alphaEnabled = true;
16+
private HorizontalAlignment textAlignment = HorizontalAlignment.Left;
1617

1718
public ColorPicker()
1819
{
@@ -78,6 +79,21 @@ public bool Hexadecimal
7879
}
7980
}
8081

82+
public HorizontalAlignment TextAlign
83+
{
84+
get { return textAlignment; }
85+
set
86+
{
87+
if (textAlignment == value)
88+
return;
89+
textAlignment = value;
90+
nslAlpha.TextAlign = value;
91+
nslRed.TextAlign = value;
92+
nslGreen.TextAlign = value;
93+
nslBlue.TextAlign = value;
94+
}
95+
}
96+
8197
protected override void OnLoad(EventArgs e)
8298
{
8399
base.OnLoad(e);

0 commit comments

Comments
 (0)