2012-02-01 65 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