Validating two usercontrols
Using the dynamic approach can create the application more portable. What we do in this event handler is locate the login Ctrl instance inside the place holder.
If it was successfully loaded, then it would exist. Taking into consideration our two-menu example, in the button event-handler, we will loop for both controls. Though simple, this approach is unknown to a vast range of developers. Net application makes the web-site more robust and adaptable.
Net provides with the capability to easily create custom reusable controls by using the same techniques that are used to develop an ASP. Net server control, rather than simply including the functionality provided by another file.
Code Behind file for the above consist of t HE On Size Changed function whwnever the size of the usercontrol changes.
Size change Behaviourpublic class Size Changed Behaviour As the size changes or as i dock the toolwindow ,the command that is User Control Size Changed should call that corresponding On Size Changed function.
So when i drag the tool window i am setting the height width for that dragged toolwindow using Dock Site. Parent Container, new Size(230, 165), Docking Window State.
Docked);and docked to the top of the base docksite, Then its not calling the Onsize Changed behaviour for that toolwindow.
Only through the container changing real layout size will WPF fire the Size Changed event.