WPF Animation Using DoubleAnimation

Easiest way to animate is using the Double Animation provided by WPF. It is much easier to use the Double Animation as there are only few statements needed and they are quite straight forward to implement. For e.g. Specifying the following parameters will let you start understand the animation easily
• From
• To
• RepeatBehavior
• Duration
After this setup, just calling the BeginAnimation method alongwith which property needs to be animated (in our case it is the right property) will start sliding horizontally.

Animation Setup

For horizontal marquee, we need two controls. One is the outer panel and the sliding label.  For horizontal sliding or marquee we can either change the left property or right property using double animation object. For example we are going to try the right property.
If you want the sliding to be faster then reduce the duration. If you want the sliding t ...

WPF Listbox Binding Images from DB

WPF ListBox control is quite different from windows win forms and it has lots of abilities to extend and design. With just ListBox we can design most of the equivalent controls available in ASP.Net data controls section. However the implementation of WPF ListBox is also quite different from win forms and ASP.Net controls. For e.g. binding an image is bit tricky than we do in ASP.Net and the linq and Ms SQL Sample DB northwind may demand additional knowledge on the respective technologies

Fetching Database values using Linq to SQL

As it has been already discussed in detail in the article WPF Datagrid and Linq to SQL, I am not going to detail again here. We can use the Linq to SQL to fetch the data and pass it to the WPF to bind the ListBox. The equivalent datatypes will be chose for the respective database fields. So the important mapping w ...

Read more here:   Wpf Listbox Image Binding From Db 

VB.Net Tutorial - WPF Listbox using Scrollintoview

Scrolling the WPF listbox is not that easy as we do in Windows forms applications. But the same time it is not impossible also. With the help of Scrollintoview we can achieve scrolling.

Scrollintoview Function

WPF controls are little different than normal web form controls and windows forms controls.  The list box in windows can be scrolled by changing the selected index easily. But in wpf selection and scrolling are handled differently. So in order to scroll while selecting the control we need to write codes separately.

Note

Another point to note is, though the following code snippet will work as is. It is not working in a specific scenario, if the item you would like to scroll to is loaded inside the list box but not visible on the screen, then the scroll won’t work. I am finding a solution. From the initial analysis, the following seems to be working

Begin Invoke

Private Dele ...

Read more here:   WPF Listbox Scrollintoview 

VB.Net Tutorial - WPF DataGrid

When I started working in WPF, in my first sample I tried to locate the control in the toolbox. To my surprise I couldn’t find it. I started searching it in the web for some information on that. I found though the DataGrid is not available in WPF under the framework. It is available from CodePlex for public downloading.

.Net Framework 4.0

The above paragraph is not applicable for the .Net framework 4.0, as the .net framework 4.0 already preloaded with the WPF DataGrid control. Only difference I faced is, when you are dragging the control from the toolbox. The CodePlex DataGrid is putting defaults to the AutoGenerateColumns as true but the .Net framework control defaults the AutoGenerateColumns as false.

Setup WPF ToolKit for .Net Framwork 3.5

After downloaded from CodePlex, install it. It will not be available in the tool box right out of the box. You have to choose the installed component to be listed in th ...

Read more here:   WPF Datagrid and Linq to SQL