Angled Headers in the DataGrid

In my last post, I demonstrated how to rotate the text inside a DataGrid header. And I suggested that you might want to actually create angled headers that look something like this.   My friend Cheryl, from the Silverlight UE team, and I decided to try this out. To make this work you need to know…


.NET Framework 4 and VS Beta1 docs are posted

Docs for .NET Framework 4 Beta 1, Windows Presentation Foundation (WPF), and Visual Studio 2010 Beta1 are now available at MSDN.   The new data binding builder in the WPF Designer and the Silverlight Designer You’ll see the strong focus on line-of-business (LOB) applications in this release. In particular, binding WPF and Silverlight apps to…

1

WPF Toolkit is live – DataGrid, Ribbon, and Calendar preview versions

In conjunction the morning keynote presentation at PDC, the public releases of DataGrid and Ribbon are now live. Download the binaries and source from here: · WPF Toolkit including V1 of DataGrid, V1 of DatePicker/Calendar, & preview of VisualStateManager (VSM): http://www.codeplex.com/wpf/Release/ProjectReleases.aspx?ReleaseId=15598. · Preview version of Ribbon: http://msdn.microsoft.com/officeui (install instructions here).   WPF DataGrid doing line-of-business…

4

Databinding and Add-Ins

There are many advantages to using the .NET Framework add-in technology to factor application logic and UI, including security isolation, discovery, activation, communication, lifetime management, and versioning. WPF builds on the .NET Framework add-in technology to enable visual add-ins ie add-ins that provide UI for host applications to display. All that you need to do is define…

5

Data Validation in 3.5

A cool new feature in the Data area in 3.5 is the support for IDataErrorInfo. Let’s take a look at the data validation model in 3.5 by starting with a memory refresher of that in 3.0. We end with a section that discusses how to choose between the different approaches. 3.0 Validation Model In 3.0,…

16

Expert advice on XmlDataProvider usage

I came across the following Q&A from the technical chat transcript from several months ago. Our WPF data binding expert Sam Bent was the one providing the great answers. It’s excellent information about the XmlDataProvider and I thought I’d share it here. Q: What are the guidelines for using XmlDataProvider for Xml binding? Setting the data context…

1

Binding to Web Services

In WPF, you bind to objects returned by web service method calls the same way you bind to any other objects. To demonstrate, we’ll walk through a simple application that consumes the MSDN/TechNet Publishing System (MTPS) Content Service, discussed here. Our application implements a very simple scenario that retrieves the list of languages supported by…

0

How do I programmatically interact with template-generated elements? Part II

This post shows you how to find a named element within a DataTemplate.   In Part I, we discussed how to find a named element within a ControlTemplate. That was fairly simple; you’d call Template.FindName on the control that the ControlTemplate has been applied to. But if the template is a DataTemplate, then the scenario…

24

Displaying Enum Values using Data Binding

Some of the FAQs about data binding are: • How do I bind to a method?• How do I bind between instantiated controls?• How do I bind an ItemsControl to an enum? I put together a quick sample that should answer the above questions: <Window   xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation”   xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml”   xmlns:sys=”clr-namespace:System;assembly=mscorlib”   SizeToContent=”WidthAndHeight”   Title=”Show Enums in a…

4

WPF Basic Data Binding FAQ

Through talking to people and monitoring both internal and external forums, I have compiled a list of questions people often have when first learning about WPF data binding. If you have any questions, please leave a comment and let me know!   What is target and what is source? In WPF, you typically use data…

15