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.
I'm tired of asking for this in the Windows 11 Insider feedback. It seems to me that Microsoft solemnly ignores insiders and their feedback or suggestions made to the system.
It changes the fact that you have legal recourse of copyright laws if you wrote the book without AI. But you have no copyright so no legal recourse if AI wrote it.
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