Label pt=new Label ();
La1. The Content="test word";
La1. Width=400;
La1. Height=50;
La1. FontSize=20;
.//text center
.//word wrap
La1. Margin=new Thickness (0, 0, 0, 0);//in the position of the parent container
CodePudding user response:
You actually write the difference but actually, nothing but is to center the text attribute assignment,If not clear effect, you can now write a Label control and to the properties of interface assignment,
The desired effect, and then the attribute assigned to pt.
CodePudding user response:
La1. AutoSize=false; (Label box height their definition)CodePudding user response:
La1 is what, I only see pt is the labelCodePudding user response:
Several attribute is set to tryCodePudding user response:
In XML using HorizontalContentAlignment="Center"The available code don't know how to do
CodePudding user response:
Try, code is always wrong