Resize event of wpf window
-
Hi I want to capture rezise event of WPF window ... how can I do that ... please guide...its urgent :( :( :(
ciacia wrote:
its urgent
It's always urgent. Just once, I'd like to see somebody say get round to it when you can. Anyway - the Window element in your XAML exposes a SizeChanged event so you'd hook it up as in
<Window x:Class="MyNamespace.MyClass"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Size Test" Height="411" Width="310"
Loaded="Window_Loaded"
SizeChanged="Window_SizeChanged">This creates an event handler in the codebehind that looks like this:
private void Window_SizeChanged(object sender, SizeChangedEventArgs e)
{}
Deja View - the feeling that you've seen this post before.
-
ciacia wrote:
its urgent
It's always urgent. Just once, I'd like to see somebody say get round to it when you can. Anyway - the Window element in your XAML exposes a SizeChanged event so you'd hook it up as in
<Window x:Class="MyNamespace.MyClass"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Size Test" Height="411" Width="310"
Loaded="Window_Loaded"
SizeChanged="Window_SizeChanged">This creates an event handler in the codebehind that looks like this:
private void Window_SizeChanged(object sender, SizeChangedEventArgs e)
{}
Deja View - the feeling that you've seen this post before.
Funny but useful reply. tks