Reputation: 839
Imagine we have gind in another grid , parent grid have many children , based on them our grid gets some actual width heights. All i need is to fix getted actual width as my grids width, how can i do it? I tried to bind width to actual width itself but result it terrible you now.
Thanks
Upvotes: 0
Views: 39
Reputation: 285
From what I understand , you want to retrieve the size of the parent without defining it, and when you do, you get an NaN value. You have to update the layout of the Grid first, like this :
parentGrid.UpdateLayout();
double with = parentGrid.ActualWidth;
Upvotes: 0