I'm learning WPF, or attempting to learn, and I have a user control that I would like to have an image resize when the control resizes. However the SizeChanged event is only firing when I add the control to the window.
"The entire scanning and conversion process takes place locally on your device, using Android’s built-in API for snapping documents. The document itself is also only stored locally until you decide to send it. Just like other WhatsApp messages, these scans are secured with end-to-end encryption when you send them to recipients. The only privacy risk is the user sending the PDF to the wrong person."
Question
James Rose
Hey gang,
I'm learning WPF, or attempting to learn, and I have a user control that I would like to have an image resize when the control resizes. However the SizeChanged event is only firing when I add the control to the window.
The code is simple enough:
private void Grid_SizeChanged(object sender, SizeChangedEventArgs e) { MessageBox.Show("Hthis.grdMain.Height.ToString()); }
What am I doing wrong?
Link to comment
https://www.neowin.net/forum/topic/1014896-wpf-sizechanged-fires-only-once/Share on other sites
5 answers to this question
Recommended Posts