When Are All DependencyProperties Set
-
I have a CustomControl with three DP's. On startup the change callbacks fire for all three, but I need to know when they have ALL fired, so I can then set up the control using their data. The Initialized gets called first, then the DP's, so I can't rely on that. I was thinking of creating a bool flag for each, and when each are true, then go ahead and load my control using all the DP's, but I'm wondering if there's another way. An event that fires AFTER the DP's would be nice, but I don't see one.
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
-
I have a CustomControl with three DP's. On startup the change callbacks fire for all three, but I need to know when they have ALL fired, so I can then set up the control using their data. The Initialized gets called first, then the DP's, so I can't rely on that. I was thinking of creating a bool flag for each, and when each are true, then go ahead and load my control using all the DP's, but I'm wondering if there's another way. An event that fires AFTER the DP's would be nice, but I don't see one.
In theory, theory and practice are the same. But in practice, they never are.” If it's not broken, fix it until it is. Everything makes sense in someone's mind.
If I understand what you're looking for, I use the control's Loaded event. At that point the control is ready to go and all of the Dependency properties should be set.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013