Imports System.ComponentModel Public Class CheckParamV Implements INotifyPropertyChanged Sub New() InitializeComponent() End Sub Private m_ccc As String Public Property ccc As String Get Return m_ccc End Get Set(value As String) m_ccc = value End Set End Property Public Shared ReadOnly ParamTxBlProperty As DependencyProperty = DependencyProperty.Register("ParamTxBl", GetType(String), GetType(CheckParamV)) Public Property ParamTxBl As String Get Return CStr(GetValue(ParamTxBlProperty)) End Get Set(value As String) SetValue(ParamTxBlProperty, value) End Set End Property Public Shared ReadOnly ParamChBxProperty As DependencyProperty = DependencyProperty.Register("ParamChBx", GetType(Boolean), GetType(CheckParamV), New FrameworkPropertyMetadata() With {.BindsTwoWayByDefault = True}) Public Property ParamChBx As Boolean Get Return CBool(GetValue(ParamChBxProperty)) End Get Set(value As Boolean) SetValue(ParamChBxProperty, value) End Set End Property Public Shared ReadOnly ForegroundChxTxBlProperty As DependencyProperty = DependencyProperty.RegisterAttached( NameOf(ForegroundChxTxBl), GetType(Brush), GetType(CheckParamV), New FrameworkPropertyMetadata(SystemColors.WindowTextBrush, FrameworkPropertyMetadataOptions.[Inherits])) ' Declare a get accessor method. Public Shared Function GetForegroundChxTxBl(element As CheckParamV) As Brush Return DirectCast(element.GetValue(ForegroundChxTxBlProperty), Brush) End Function ' Declare a set accessor method. Public Shared Sub SetForegroundChxTxBl(element As CheckParamV, value As Brush) element.SetValue(ForegroundChxTxBlProperty, value) End Sub Public Property ForegroundChxTxBl As Brush Get Return DirectCast(GetValue(ForegroundChxTxBlProperty), Brush) End Get Set(ByVal value As Brush) SetValue(ForegroundChxTxBlProperty, value) End Set End Property Public Shared ReadOnly ParamVisibilityProperty As DependencyProperty = DependencyProperty.Register("ParamVisibility", GetType(Visibility), GetType(CheckParamV)) Public Event PropertyChanged(sender As Object, e As PropertyChangedEventArgs) Implements INotifyPropertyChanged.PropertyChanged Public Sub NotifyPropertyChanged(propName As String) RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName)) End Sub End Class