Files
EgtWPFLib5/StringParamV.xaml.vb
T
Renzo Lanza ce52b469d9 EgtWPFLib5 :
- corrette Note di sistema in Db Lavorazioni, Db Utensili e Operazioni per essere solo leggibili e le relative TextBox ReadOnly
2021-03-12 11:23:37 +00:00

123 lines
4.3 KiB
VB.net

Imports System.Globalization
Imports System.Windows.Controls.Primitives
Imports System.ComponentModel
Public Class StringParamV
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(StringParamV))
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 ParamTxBxProperty As DependencyProperty =
DependencyProperty.Register("ParamTxBx", GetType(String), GetType(StringParamV), New FrameworkPropertyMetadata() With {.BindsTwoWayByDefault = True})
Public Property ParamTxBx As String
Get
Return CStr(GetValue(ParamTxBxProperty))
End Get
Set(value As String)
SetValue(ParamTxBxProperty, value)
End Set
End Property
'Private Shared Sub OnParamTxBxChangedCallback(sender As DependencyObject, e As DependencyPropertyChangedEventArgs)
' Dim StringParamV As StringParamV = DirectCast(sender, StringParamV)
' If Not IsNothing(sender) Then
' 'StringParamV.ParamValue.Text = CStr(e.NewValue)
' StringParamV.ParamTxBx = CStr(e.NewValue)
' StringParamV.NotifyPropertyChanged("ParamTxBx")
' End If
'End Sub
Public Property ParamErrorMsg() As String
Get
Return CStr(GetValue(ParamErrorMsgProperty))
End Get
Set(ByVal value As String)
SetValue(ParamErrorMsgProperty, value)
End Set
End Property
Public Shared ReadOnly ParamErrorMsgProperty As DependencyProperty =
DependencyProperty.Register("ParamErrorMsg", GetType(String), GetType(StringParamV))
Public Property ParamVisibility() As Visibility
Get
Return CType(GetValue(ParamVisibilityProperty), Visibility)
End Get
Set(ByVal value As Visibility)
SetValue(ParamVisibilityProperty, value)
End Set
End Property
'Friend Sub ParamValue_TextChanged(sender As Object, e As TextChangedEventArgs) Handles ParamValue.TextChanged
' ParamTxBx = ParamValue.Text
'End Sub
Public Shared ReadOnly ParamVisibilityProperty As DependencyProperty =
DependencyProperty.Register("ParamVisibility", GetType(Visibility), GetType(StringParamV))
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
Public Shared ReadOnly IsErrorEnabledProperty As DependencyProperty =
DependencyProperty.Register("IsErrorEnabled", GetType(Boolean), GetType(StringParamV))
Public Property IsErrorEnabled() As Boolean
Get
Return CType(GetValue(IsErrorEnabledProperty), Boolean)
End Get
Set(ByVal value As Boolean)
SetValue(IsErrorEnabledProperty, value)
End Set
End Property
Public Shared ReadOnly ParamErrorMsgVisibilityProperty As DependencyProperty =
DependencyProperty.Register("ParamErrorMsgVisibility", GetType(Visibility), GetType(StringParamV))
Public Property ParamErrorMsgVisibility() As Visibility
Get
Return CType(GetValue(ParamErrorMsgVisibilityProperty), Visibility)
End Get
Set(ByVal value As Visibility)
SetValue(ParamErrorMsgVisibilityProperty, value)
End Set
End Property
Public Shared ReadOnly IsParamReadOnlyProperty As DependencyProperty =
DependencyProperty.Register("IsParamReadOnly", GetType(Boolean), GetType(StringParamV))
Public Property IsParamReadOnly() As Boolean
Get
Return CType(GetValue(IsParamReadOnlyProperty), Boolean)
End Get
Set(ByVal value As Boolean)
SetValue(IsParamReadOnlyProperty, value)
End Set
End Property
End Class