2012-02-01 61 views

回答

8
myControl.Margin = new Thickness(left, top, right, bottom); 

myControl.Margin = new Thickness(allSideMarginSize); 

應該這樣做。

+0

請參閱http://msdn.microsoft.com/en-us/library/system.windows.controls.control.borderthickness.aspx – ZombieSheep 2012-02-01 15:13:22