Hosting a WPF content inside a Windows Forms application is very easy. You need to use ElementHost control which takes a FrameworkElement in its Child property. So if you specify a UserControl for Child of an ElementHost, the WPF content will be loaded to the Forms application .
In this post I am going to describe how you can use WPF popup control with Hyperlink. Instead of showing the content with in Popup Control, we can use common Tool Tips as we can easily bind any WPF element within Tool Tips. But there are few advantages of Popup controls over default Tool tips […]
If you are new to WPF, you must know that XAML can define or declare any object under your local / global namespace just like your code does. It has full capability to load up your types based on the namespace you provide in your XAML.
If you are thinking to build a control and apply the same to more than one place, you can take two kinds of approaches. Either you can create an User control inheriting from UserControl and adding a XAML for your control or use CustomControl to write yourself. Either one of them you choose they have […]
Windows Forms can be hosted inside a WPF application using WindowsFormHost. In this post I will show how easily you can use WindowsFormHost to host a windows Form content inside a WPF application.
We all know that StaticResource works mainly with Freezables in WPF. You cannot define a resource like a Button or a TextBox as StaticResource because the runtime will count it to be shared and creating the resource more than once from Resources will leave you an exception.
If you have worked with WPF 3.5 before, you know that declaring a normal image in your code will render your image quite fine. But If you do the same thing in .NET 4.0 or even you convert your existing application from previous version to .NET 4.0, all the images that were rendering quite Ok […]
WPF has a facility to search the AncestorType for a control from a child control such that it will find the next parent control that matches the Ancestor Type defined. Silverlight implements this feature to enable you to search your ancestor from child control from your visual tree and bind the child property with it. […]
WPF comes with lots of fun and advantages. We can change the look and behavior of a control very easily which would have been very cumbersome when we are in normal winforms applications. WPF has few flexibilities like Superior Binding capabilities, Animation, Transformation, Virtualizations etc. Each of these made the framework richer in all respect. […]
With the introduction of MVVM pattern and WPF code structure, we have gradually mould ourselves to separate our presentation layer more with the actual Views. In doing so, we have implemented a lots of interfaces, some corresponds to the Command interfaces using ICommand interface which lets you define your object to handle an Button Click […]
If you are building a WPF application with lots of animation inside it, may be some of which runs forever, you must have been a problem of eating up your entire CPU or a mammoth portion of CPU while the program is running. The problem is because by default, the framerate for WPF application is […]
Animation in WPF application has few major hurdles when it is not used in optimally. For public applications, you need to give more stress on performance of the UI. If you use animation for your application, you need to ensure that it goes smoothly. Certain abrupt change in animation may sometimes produce rusty animation for […]