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.
Mmmmmaybe... I'm undecided. I sort of appreciate the fact that it's at least different. Unless you buy an exotic car, you're going to be purchasing something that looks 1% different from what everything looked like last year. I don't have anything nice to say about Elon Musk, but I do wish more companies would at least try something new. There's a historical pattern of punishing any vehicle that doesn't look like everything else.
I was pretty iffy going in, but actually watching the keynote and seeing the UI on MacOS I think it's looking much better than most of the concept art that was floating around the internet, and overall I agree with the comments here Vista/7 was the nicest looking windows OSs and apple seems to be going in a good direction here. I look forward to the Widgets that can be styled to fit your personal tastes. A couple of their quick shots showed quite a bit of color customization for the general OS too, which reminded me a lot of old windows and Mac OSs.
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