ad38e4d3e1
This reverts commit 00a338c202.
112 lines
2.9 KiB
VB.net
112 lines
2.9 KiB
VB.net
Imports System.Collections.ObjectModel
|
|
|
|
' Elemento del treeview che ha sottoelementi del suo stesso tipo
|
|
Public Class InheritableTreeViewItem
|
|
Inherits VMBase
|
|
|
|
Friend m_Name As String
|
|
Public Property Name As String
|
|
Get
|
|
Return m_Name
|
|
End Get
|
|
Set(value As String)
|
|
If (value <> m_Name) Then
|
|
m_Name = value
|
|
NotifyPropertyChanged(NameOf(Name))
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Friend m_Parent As InheritableTreeViewItem
|
|
Public ReadOnly Property Parent As InheritableTreeViewItem
|
|
Get
|
|
Return m_Parent
|
|
End Get
|
|
End Property
|
|
|
|
Friend m_IsSelected As Boolean
|
|
Public Overridable Property IsSelected As Boolean
|
|
Get
|
|
Return m_IsSelected
|
|
End Get
|
|
Set(value As Boolean)
|
|
If (value <> m_IsSelected) Then
|
|
m_IsSelected = value
|
|
NotifyPropertyChanged(NameOf(IsSelected))
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_isExpanded As Boolean
|
|
Public Property IsExpanded As Boolean
|
|
Get
|
|
Return m_isExpanded
|
|
End Get
|
|
Set(value As Boolean)
|
|
If (value <> m_isExpanded) Then
|
|
m_isExpanded = value
|
|
NotifyPropertyChanged(NameOf(IsExpanded))
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsActive As Boolean
|
|
Public Property IsActive As Boolean
|
|
Get
|
|
Return m_IsActive
|
|
End Get
|
|
Set(value As Boolean)
|
|
If value <> m_IsActive Then
|
|
m_IsActive = value
|
|
NotifyPropertyChanged(NameOf(IsActive))
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_IsEnabled As Boolean = True
|
|
Public Property IsEnabled As Boolean
|
|
Get
|
|
Return m_IsEnabled
|
|
End Get
|
|
Set(value As Boolean)
|
|
m_IsEnabled = value
|
|
NotifyPropertyChanged(NameOf(IsEnabled))
|
|
End Set
|
|
End Property
|
|
|
|
Private m_sPictureString As String
|
|
Public Property PictureString As String
|
|
Get
|
|
Return m_sPictureString
|
|
End Get
|
|
Set(value As String)
|
|
If value <> m_sPictureString Then
|
|
m_sPictureString = value
|
|
NotifyPropertyChanged(NameOf(PictureString))
|
|
End If
|
|
End Set
|
|
End Property
|
|
|
|
Private m_Items As ObservableCollection(Of InheritableTreeViewItem)
|
|
Public Property Items As ObservableCollection(Of InheritableTreeViewItem)
|
|
Get
|
|
Return m_Items
|
|
End Get
|
|
Set(value As ObservableCollection(Of InheritableTreeViewItem))
|
|
m_Items = value
|
|
End Set
|
|
End Property
|
|
|
|
Sub New(Name As String)
|
|
Me.Name = Name
|
|
Me.Items = New ObservableCollection(Of InheritableTreeViewItem)
|
|
End Sub
|
|
|
|
Sub New(Name As String, Parent As InheritableTreeViewItem)
|
|
Me.Name = Name
|
|
Me.Items = New ObservableCollection(Of InheritableTreeViewItem)
|
|
Me.m_Parent = Parent
|
|
End Sub
|
|
|
|
End Class
|