.net - How to bind width of child element to width of parent element in WinRT -
i have progressbar in stackpanel. want progressbar have size of stackpanel or bit smaller.
i tried width="{binding actualwidth, elementname=parentelementname}"
doesn't work in winrt
sample code
<stackpanel grid.row="1" margin="120,15,0,0"> <progressbar x:name="progressbar1" value="{binding progresspercent}" horizontalalignment="left" isindeterminate="false" maximum="100" height="10"/> </stackpanel>
you need provide path in binding.
width="{binding elementname=parentelementname, path=actualwidth}"
see if works.
Comments
Post a Comment