If you want to create applications by using Windows Presentation Foundation (WPF) with Extensible Application Markup Language (XAML), you can use the IBM Database Add-Ins for Visual Studio to create IBM data sources for the applications.
With the add-ins, you can generate a sample XAML application from an IBM database table, view, or procedure, and then use one or more of the following three bindings that are generated in the sample application:
Prerequisite: The Microsoft® Visual J#® 2.0 Redistributable Package - Second Edition (x86) must be installed on your system. You can download the package from the Microsoft Visual J# 2.0 Redistributable Package - Second Edition (x86) Web page.
To create an IBM data source for an XAML application:
If you are generating the XAML application from a procedure, the Run Options window opens. In the window, specify a value for each IN and INOUT parameter, and then click Run.
The sample XAML application is generated, with the IBM data source bound to the free text, listbox and grid controls.
The open SampleDatSet.xsd file shows the dataset that was generated from your selected database object.
The Design view shows the generated controls, and the XAML view contains the underlying design code. The Window1.xaml.cs code-behind file contains the bindings for the data source.
<snippet6> of the XAML design code, copy and paste the
code for the generated <TextBox> element, and then change
the column name in the Text
attribute.<snippet5>, copy and paste the <Label>
element, and then change the content of the label.IBM Data Sources in XAML Applications | Using Visual Studio 2008 Technology in IBM Database Add-Ins for Visual Studio