My grid height is set to auto and i would like to set the stackpanel height to 80% grid height
I found a solution to use the screen size
'stp is the stackpanel
Dim bounds As New Rect Dim scaleFactor As Double Dim size1 As Size bounds = ApplicationView.GetForCurrentView().VisibleBounds scaleFactor = DisplayInformation.GetForCurrentView().RawPixelsPerViewPixel size1 = New Size(bounds.Width * scaleFactor, bounds.Height * scaleFactor) stp.Height = size1.Height * 0.8 / scaleFactor
5 people are following this question.