Hi
My grid height is set to auto and i would like to set the stackpanel height to 80% grid height
Thanks
Hi
My grid height is set to auto and i would like to set the stackpanel height to 80% grid height
Thanks
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
Thanks for sharing the solution, you can mark yourself to help others who have the same issue.
5 people are following this question.