Do Silverlight compone开发者_StackOverflow中文版nts have a property similar to Flex's includeInLayout
property? I'm looking for something that will allow a Silverlight component or container to grow and/or shrink without affecting its neighbors or parents positioning or size.
No. There is only the Visible property (Visible/Collapsed). In the past I had to put whatever I wanted to hide in a container that was either statically sized or not sized to wrap it's contents (so that it still took up space). If the you use a container for only this purpose be sure to clean up any padding, etc.
Visibility Property: http://msdn.microsoft.com/en-us/library/system.windows.uielement.visibility(v=vs.95).aspx
Anything you can do using UIElement.RenderTransform will not update layout, so you can scale, translate, rotate without affecting the elements around.
精彩评论