so if I want to get/set the window size, everyone brings up left, top, actualLeft, actualTop. And if I want to get/set window location, everyone brings up LocationChanged event.
But I have none of these. I am on a WPF Page and I only see SizeChanged event. I want to get/set width and height and also get/set the window location.
I have this structure:
<Page
<!-- stuff here -->
SizeChanged="Page_SizeChanged" Loaded="Page_Loaded">
<Grid Width="auto" Height="auto">
</Grid>
</Page>
And in code behind (MyPage.xaml.cs), if I use this.width
, the grid width changes but not the window width. And there is no top, left properties or LocationChanged events.
How can I do that?