06-10-12, 10:30 PM
كاتب الموضوع : BADRMEDIA
ContentAlignment
المحاذاة الخاصة بالنص هذه الخاصية مشتركة لأدوات كثيرة ما سنتعلمه هنا للأداة Button ستجده فى أدوات أخري
حيث أن الخاصية Text Align هي المسئولة عن المحاذاة الخاصة بنص الأداة
كما نري فى الصورة هناك تسع اتجاهات محاذاة للنص وكل ذلك قمنا بتنفيذة من الخاصية
Text Align الموجودة فى خصائص الأداة Button
وللوصول لذلك عن طريق الكود - يمكن ذلك بواسطة الطريقة TextAlign
كود :
Button1.TextAlign = ContentAlignment.TopLeft
Button2.TextAlign = ContentAlignment.TopCenter
Button3.TextAlign = ContentAlignment.TopRight
Button4.TextAlign = ContentAlignment.MiddleLeft
Button5.TextAlign = ContentAlignment.MiddleCenter
Button6.TextAlign = ContentAlignment.MiddleRight
Button7.TextAlign = ContentAlignment.BottomLeft
Button8.TextAlign = ContentAlignment.BottomCenter
Button9.TextAlign = ContentAlignment.BottomRight