Protected override int VisualChildrenCount Public ControlAdorner(FrameworkElement adornedElement, FrameworkElement adorningElement) Private readonly FrameworkElement mAdorningElement To be able to use any user control as an adorner, first we need to create a class that inherits from Adorner class and override few methods. To achieve this, I place a user control on top of the window as an adorner, and then by using attached properties on the window, I display or hide the adorner accordingly. My personal favorite is darkening the main window and displaying a message in the middle of the screen, something like: ) that a task is being executed even though the task is still executed on a separate thread. We still should let the user know in some way (by displaying a progress bar, darkening the window. To avoid this scenario, all the processing should be executed on a separate thread, leaving the main thread to deal only with a UI specific stuff. This usually happens when a time-consuming task (lengthy calculations, database access, I/O access, etc.) was executed on the main thread, making the application unusable until the task has finished executing. One of the worst Windows applications from the user experience perspective is the application that when clicking on something, it just hangs and "freezes" and becomes unresponsive for a certain period of time and then it just becomes alive again.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |