how to bind width of child element to width of parent element in silverlight

后端 未结 6 1344
南笙
南笙 2021-01-30 20:15

I have a grid whose width is \"1*\". So the actual width decided at runtime I think. Within that grid I have another grid whose width I want to set to the runtime width of paren

6条回答
  •  爱一瞬间的悲伤
    2021-01-30 20:44

    This will actually help you I guess

    Width="{Binding ActualWidth, ElementName=parentElementName}"
    

    This binds the width to the parent element or the element name provided

提交回复
热议问题