Reputation: 185
I don't know how to link use the Window.SizeChanged event properly in developing a C# Windows 8 app.
I have a basic event that I would like to run:
private void OnWindowSizeChanged(object sender, Windows.UI.Core.WindowSizeChangedEventArgs e)
{
// Do something.
}
but I don't know how to make this run when the window's size changes. I tried linking to it on the page element in my XAML file with SizeChanged="OnWindowSizeChanged"
, but that returns an error (No overload for 'OnWindowSizeChanged' matches delegate 'Windows.UI.Xaml.SizeChangedEventHandler'
).
How can I fix this problem?
Upvotes: 0
Views: 795