Tag: Binding

How to bind a WPF ListView to a list

As with many controls in .Net, binding is a powerful way to display data from a data source. In this simple example we’ll show you how to bind a ListView to a list of objects. We’ll start by defining the data we want in the list by creating a class with properties. In this simple




Binding WPF element to an object

When binding a WPF element to another WPF element you can use the ElementName property. But when binding to an Object you use the Source property instead. You don’t need to set the source in the element itself. If source isn’t set the system searches for a source set for the DataContext property further up




Element to element data binding in WPF

Data bindings has existed for quite some time in Windows Forms but in WPF it’s more powerful than ever. In this example I’ll show how to create simple databindings inbetween two WPF elements. Data bindings are created through the Bindings class. In this very simple example a label is declaratively bound to a slider so




%d bloggers like this: