Thanks..
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Button Text Alignment
Collapse
X
-
private System.Windows.Controls.Button longButton;
.
.
.
.
longButton = new System.Windows.Controls.Button
{
Name = "LongButton", Content = "BUY .", Foreground = Brushes.White,
FontWeight = FontWeights.Bold,Background = Brushes.Green
};
//Print("lng btn stuf, " + longButton.ToString() ); // just says BUY
// there is no TextAlign
// places text right aligned, not centered
Comment
-
You should find this useful: https://docs.microsoft.com/en-us/dot...tframework-4.8
In particular: https://docs.microsoft.com/en-us/dot...ntentalignment
Thanks.
Comment
-
Hello kenz987,
If the above comment is not the solution this could also relate to where you have the button placed. I would also suggest to try the sample in the following page to view if those buttons are centered (should look like the image), if so you can try using the grid for button placement in whatever parent control you are using.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
70 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
41 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|
||
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
166 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
101 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
165 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|

Comment