Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 parent grid. How Can I do that in xaml through binding.

like image 875
choudhury smrutiranjan parida Avatar asked Sep 18 '13 05:09

choudhury smrutiranjan parida


1 Answers

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

like image 103
Anobik Avatar answered Sep 22 '22 09:09

Anobik