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.
JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by kaywai, Today, 06:26 AM
|
1 response
6 views
0 likes
|
Last Post
by kaywai
Today, 06:35 AM
|
||
Started by ct, 05-07-2023, 12:31 PM
|
6 responses
205 views
0 likes
|
Last Post
by wisconsinpat
Today, 06:29 AM
|
||
Started by kevinenergy, 02-17-2023, 12:42 PM
|
118 responses
2,780 views
1 like
|
Last Post
by kevinenergy
Today, 05:41 AM
|
||
Started by briansaul, Today, 05:31 AM
|
0 responses
10 views
0 likes
|
Last Post
by briansaul
Today, 05:31 AM
|
||
Started by traderqz, Yesterday, 12:06 AM
|
11 responses
28 views
0 likes
|
Last Post Today, 05:11 AM |
Comment