Click here to Skip to main content
15,881,812 members
Articles / Programming Languages / Visual Basic

WPF-Drawing Canvas Control

Rate me:
Please Sign up or sign in to vote.
4.93/5 (13 votes)
5 Oct 2012CPOL13 min read 123.8K   8.1K   47  
A drawing tool program that can create simplified XAML code
Public Class XAMLViewer

    Private Sub Window_Loaded(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles MyBase.Loaded

    End Sub

    Public Sub New(ByVal doc As XDocument)

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

        ' Add any initialization after the InitializeComponent() call.
        txtDocument.Text = doc.ToString

       
    End Sub

    Private Sub Border_MouseDown(sender As System.Object, e As System.Windows.Input.MouseButtonEventArgs)
        '  Me.DragMove()
    End Sub

    Private Sub TextBlock_MouseDown(sender As System.Object, e As System.Windows.Input.MouseButtonEventArgs)
        Me.DragMove()
    End Sub

    Private Sub btn_AddPicture_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles btn_AddPicture.Click
        Me.Close()
    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
Chief Technology Officer
Norway Norway
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions