Click here to Skip to main content
12,507,845 members (56,464 online)
Click here to Skip to main content

Stats

112.7K views
6 downloads
49 bookmarked
Posted

Mole II for WPF

, , , 31 Dec 2007 CPOL
Introduces the second version of a very useful and educational debugger visualizer for WPF developers.
Mole_Visualizer_2_1_1_VS2008_SourceAndTestProject.zip
Mole_Visualizer_2_1_1_VS2005_SourceAndTestProject.zip
Mole_Visualizer_2_1_1_VS2005_Release.zip
Mole_Visualizer_2_1_1_VS2008_Release.zip
Mole.Visualizer.dll
Mole.Visualizer
Custom Controls
Data Source
Image Processing
Data
Debugger Visualizer
Enums Constants
Event Args
Extended Controls
Images
MoleVisualUnavailable.gif
Mole.Visualizer.csi
Mole.Visualizer.suo
Mole.Visualizer.vbproj.user
My Project
Application.myapp
Settings
Visualizer UI
XSLT
Mole.TestBench
bach.jpg
Mole.TestBench.csi
Mole.TestBench.suo
My Project
Mole.Visualizer.dll
bach.jpg
Mole.TestBench.csi
Mole.TestBench.suo
MoleVisualUnavailable.gif
Mole.Visualizer.csi
Mole.Visualizer.suo
Mole.Visualizer.vbproj.user
Application.myapp
Mole.Visualizer.dll
MoleVisualUnavailable.gif
Mole.Visualizer.csi
Mole.Visualizer.suo
Mole.Visualizer.vbproj.user
Application.myapp
bach.jpg
Mole.TestBench.csi
Mole.TestBench.suo
Mole.Visualizer.dll
MoleVisualUnavailable.gif
Mole.Visualizer.csi
Mole.Visualizer.suo
Mole.Visualizer.vbproj.user
Application.myapp
bach.jpg
Mole.TestBench.csi
Mole.TestBench.suo
Mole.Visualizer.dll
MoleVisualUnavailable.gif
Mole.Visualizer.csi
Mole.Visualizer.suo
Mole.Visualizer.vbproj.user
Application.myapp
bach.jpg
Mole.TestBench.csi
Mole.TestBench.suo
Mole.Visualizer.dll
MoleVisualUnavailable.gif
Mole.Visualizer.csi
Mole.Visualizer.suo
Mole.Visualizer.vbproj.user
Application.myapp
bach.jpg
Mole.TestBench.csi
Mole.TestBench.suo
Imports System.Runtime.Serialization

<Serializable()> _
Public NotInheritable Class TreeElementProperty
    Implements ISerializable

#Region " Declarations "

    ' NOTE:  When you add/remove a field, be sure to update the serialization logic!
    Private _bolIsDependencyProperty As Boolean = False
    Private _bolIsDrillable As Boolean = False
    Private _strCategory As String = String.Empty
    Private _strName As String = String.Empty
    Private _strPropertyType As String = String.Empty
    Private _strValue As String = String.Empty
    Private _strValueSource As String = String.Empty

#End Region

#Region " Properties "

    ''' <summary>
    ''' Category assigned to the property by the creator of the property.  Is value from the System.ComponentModel.Category attribute.
    ''' </summary>
    Public ReadOnly Property Category() As String
        Get
            Return _strCategory
        End Get
    End Property

    ''' <summary>
    ''' Is this property a dependency property?
    ''' </summary>
    Public ReadOnly Property IsDependencyProperty() As Boolean
        Get
            Return _bolIsDependencyProperty
        End Get
    End Property

    ''' <summary>
    ''' Can this property participate in the Molodrilling operations inside the Moloscope?
    ''' </summary>
    Public ReadOnly Property IsDrillable() As Boolean
        Get
            Return _bolIsDrillable
        End Get
    End Property

    ''' <summary>
    ''' Property name
    ''' </summary>
    Public ReadOnly Property Name() As String
        Get
            Return _strName
        End Get
    End Property

    ''' <summary>
    ''' Property type name.  The name space is not included.
    ''' </summary>
    Public ReadOnly Property PropertyType() As String
        Get
            Return _strPropertyType
        End Get
    End Property

    ''' <summary>
    ''' Property value cast as a string.
    ''' This needs to be read/write because we may allow the value to be changed in the UI and sent back to the visual tree
    ''' </summary>
    Public Property Value() As String
        Get
            Return _strValue
        End Get
        Set(ByVal Value As String)
            _strValue = Value
        End Set
    End Property

    ''' <summary>
    ''' Source of the WPF dependency property value.
    ''' </summary>
    Public ReadOnly Property ValueSource() As String
        Get
            Return _strValueSource
        End Get
    End Property

#End Region

#Region " Initialization and Serialization "

    ' This protectged constructor is required when you implement ISerializable.
    Private Sub New(ByVal info As SerializationInfo, ByVal context As StreamingContext)
        _bolIsDependencyProperty = info.GetBoolean("_bolIsDependencyProperty")
        _bolIsDrillable = info.GetBoolean("_bolIsDrillable")
        _strCategory = info.GetString("_strCategory")
        _strName = info.GetString("_strName")
        _strPropertyType = info.GetString("_strPropertyType")
        _strValue = info.GetString("_strValue")
        _strValueSource = info.GetString("_strValueSource")

    End Sub

    Public Sub New(ByVal bolIsDependencyProperty As Boolean, ByVal bolIsDrillable As Boolean, ByVal strCategory As String, ByVal strName As String, ByVal strPropertyType As String, ByVal strValue As String, ByVal strValueSource As String)
        _bolIsDependencyProperty = bolIsDependencyProperty
        _bolIsDrillable = bolIsDrillable
        _strCategory = strCategory
        _strName = strName
        _strPropertyType = strPropertyType
        _strValue = strValue
        _strValueSource = strValueSource

    End Sub

    ' Required for the implementation of ISerializable.
    Private Sub GetObjectData(ByVal info As System.Runtime.Serialization.SerializationInfo, ByVal context As System.Runtime.Serialization.StreamingContext) Implements System.Runtime.Serialization.ISerializable.GetObjectData
        info.AddValue("_bolIsDependencyProperty", _bolIsDependencyProperty)
        info.AddValue("_bolIsDrillable", _bolIsDrillable)
        info.AddValue("_strCategory", _strCategory)
        info.AddValue("_strName", _strName)
        info.AddValue("_strPropertyType", _strPropertyType)
        info.AddValue("_strValue", _strValue)
        info.AddValue("_strValueSource", _strValueSource)

    End Sub

#End Region

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)

Share

About the Authors

Andrew Smith
Architect Infragistics, Inc.
United States United States
Andrew currently works as an architect for Infragistics working with windows forms and WPF. You can check out his blog here.

Josh Smith
Software Developer (Senior) Cynergy Systems
United States United States
Josh creates software, for iOS and Windows.

He works at Cynergy Systems as a Senior Experience Developer.

Read his iOS Programming for .NET Developers[^] book to learn how to write iPhone and iPad apps by leveraging your existing .NET skills.

Use his Master WPF[^] app on your iPhone to sharpen your WPF skills on the go.

Check out his Advanced MVVM[^] book.

Visit his WPF blog[^] or stop by his iOS blog[^].

Karl Shifflett
Architect Infragistics
United States United States

I’m a passionate Platform Architect at Infragistics.

I’m a long-time WPF-Prism fanatic who enjoys writing developer tools and line of business applications.

My current front end passions are: XAML platforms (Xamarin.Forms, Xamarin, UWP, and WPF), Electron, ES2015 (ES6), Node.js, Aurelia, and AngularJS (Angular 1.5.x).

For the back end I use what is appropriate for the project: SQL Server and ASP.NET WebAPI, MongoDB, Express, Azure, Firebase, etc.

I am very pragmatic software engineer and strive to write simple, maintainable, and testable code. Simple code allows for solving complex problems in a maintainable way.

My Blog

My Github Repros

My YouTube Videos

Just a grain of sand on the worlds beaches.


You may also be interested in...

Pro
Pro
| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160927.1 | Last Updated 31 Dec 2007
Article Copyright 2007 by Andrew Smith, Josh Smith, Karl Shifflett
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid