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 argusthome, 03-08-2026, 10:06 AM
|
0 responses
61 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
40 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
21 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
23 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
51 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment