Category Archives: WPF



App Service communication together with Windows Universal App, WPF and Winforms Application

App Service is a way to communicate between apps where one app can communicate with the other app’s background task.We have already learned about How to create App Service communication in Windows Universal Apps.  In this post we will see how to access the Background task created for a Windows Universal App by the WPF/Winforms application. […]

How to Create an Attached Properties in WPF

Well, attached properties, just like normal properties are an object of Dependency Property, but with a very special point embedded into it. Even though the attached properties can only be added to a class which inherits from DependencyObject and also the property where it is attached to should also be a dependency property itself, an […]

Asynchrony with Dispatcher in WPF

The new addition of async and await have already created buzz in the city with the superior language support of calling asynchronous code that looks pretty synchronous. There are two keywords that has been introduced to handle this behavior. The async is a specifier which directs the compiler to orchestrate automatically during the compilation to […]

Application State, Suspension and Termination of Apps in WinRT

WinRT application model is completely different than the existing application models. The Metro style applications are meant to work differently with least user intervention on the apps. So the user for the Metro application does not need to close the application ever. The operating system takes care of memory constraint and suspend the application or […]

Async Lambda Expression

Do you know what is coming next to C#? Asynchronous programming is really made easy with the inclusion of new contextual keywords to C# namely async and await. If you are unaware of it, I would really suggest you to read few of my posts like : C# 5.0 vNext Async support for Silverlight and […]

Writing inline Code in WPF

Generally when you create a WPF window, you will get two files automatically created for you. One which represents the XAML, which is stored in .XAML extension file, and another is a class which is stored in a Code-Behind file with .cs extension. But in certain scenarios, it is actually required to write your Code […]

How to Retrieve WPF Visual Tree Programmatically ?

In previous tip, Abhishek discussed about basic of Logical and Visual Tree in WPF.  In this tip I am going to explain how you can retrieve and examine the Visual Tree programmatically in WPF. The VisualTreeHelper provides few API Methods GetChildrenCount(), GetChild() and GetParent() using which you can get details of the Visual Tree structure.

Dealing with HWND in WPF

If you are trying to run a WPF application, you must remember that WPF content is actually constraint to a single HWND. You could have only a single window handle that represents the entire window, and everything inside it is a bitmap drawn on the WPF canvas. Except Popup (which eventually have its own HWND) […]