Ilya Verbitskiy

Thoughts and links about computer programming
posts - 16 , comments - 243 , trackbacks - 0

WPF

WPF: How to Find Control Location.
Hello everyone! Unfortunately I do not have enough time for blogging this winter. I hope the situation will change pretty soon, and I will find the time to write something here. Anyway. You know that WPF does UI layout itself and usually you should not specify the exact place for your controls. But sometimes you need to know the exact location of the control. Windows Forms solution is easy: just use Control.Location property which returns you the upper-left corner of the control relative to the upper-left ......

Posted On Tuesday, January 22, 2013 10:37 PM | Comments (0) | Filed Under [ WPF ]

WPF: Timers
I believe, once your WPF application will need to execute something periodically, and today I would like to discuss how to do that. There are two possible solutions. You can use classical System.Threading.Timer class or System.Windows.Threading.Di... class, which is the part of WPF. I have created an application to show you how to use the API. Let’s take a look how you can implement timer using System.Threading.Timer class. First of all, it has to be initialized. 1: private Timer timer; ......

Posted On Saturday, November 10, 2012 12:28 AM | Comments (1) | Filed Under [ WPF ]

WPF: Running code when Window rendering is completed
WPF is full of surprises. It makes complicated tasks easier, but at the same time overcomplicates easy task as well. A good example of such overcomplicated things is how to run code when you’re sure that window rendering is completed. Window Loaded event does not always work, because controls might be still rendered. I had this issue working with Infragistics XamDockManager. It continued rendering widgets even when the Window Loaded event had been raised. Unfortunately there is not any “official” ......

Posted On Tuesday, October 16, 2012 9:34 PM | Comments (2) | Filed Under [ WPF ]

Powered by: