Click here to Skip to main content
15,885,985 members
Articles / Desktop Programming / WPF

WPF: Customize your Application with Styles and Control Templates (Part 2 of 2)

Rate me:
Please Sign up or sign in to vote.
4.92/5 (30 votes)
5 Jun 2010CPOL12 min read 115.5K   12.4K   79  
Part two of the two-part tutorial on how to customize your WPF application using Styles and Control Templates
Class MainWindow 

    Private Sub MainWindow_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded

    End Sub

    Public Sub New()

        ' This call is required by the designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.
        Dim x As New System.Data.DataSet
        x.Tables.Add("tabla1")
        x.Tables(0).Columns.Add("Columna1")
        x.Tables(0).Columns.Add("Columna2")
        x.Tables(0).Columns.Add("Columna3")
        x.Tables(0).Columns.Add("Columna4")

        For i As Integer = 0 To 20
            x.Tables(0).Rows.Add(New String() {i.ToString, "prueba", i.ToString, "prueba"})
        Next
        x.AcceptChanges()
        Me.DataContext = x
    End Sub
End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Freelance Developer
Spain Spain
MVP Windows Platform Development 2014
MVP Windows Phone Development 2013
MVP Windows Phone Development 2012

Comments and Discussions