Search code examples
visual-studio-2008silverlight-3.0docking

Maximum Width and Height in Silverlight


In general, how does one set a control to take up the entire Height and Width of its container? I am new to Silverlight and was surprised that the controls don't have a Dock property (unless I am missing something).


Solution

  • If you set the Width and Height using the Star "*" notation it will occupy as much space that is "left" in the container. Setting the Height and Width to "Auto" will make the control use as much space as is needed to display the contents of what is in the control.