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 CarlTrading, Yesterday, 11:51 AM
|
0 responses
12 views
0 likes
|
Last Post
by CarlTrading
Yesterday, 11:51 AM
|
||
|
Started by CarlTrading, Yesterday, 11:48 AM
|
0 responses
19 views
0 likes
|
Last Post
by CarlTrading
Yesterday, 11:48 AM
|
||
|
Started by CaptainJack, 03-25-2026, 09:53 PM
|
0 responses
16 views
0 likes
|
Last Post
by CaptainJack
03-25-2026, 09:53 PM
|
||
|
Started by CaptainJack, 03-25-2026, 09:51 PM
|
0 responses
13 views
0 likes
|
Last Post
by CaptainJack
03-25-2026, 09:51 PM
|
||
|
Started by Mindset, 03-23-2026, 11:13 AM
|
0 responses
18 views
0 likes
|
Last Post
by Mindset
03-23-2026, 11:13 AM
|

Comment