Files
EgtWPFLib5/StringParamWithButtonV.xaml.vb
T
2025-03-21 23:42:17 +01:00

673 lines
34 KiB
VB.net

Imports System.ComponentModel
Public Class StringParamWithButtonV
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(StringParamWithButtonV))
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(StringParamWithButtonV), 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
' ------------------------------------------------------------------- Colore TextBlock -------------------------------------------------------------------
Public Shared ReadOnly ForegroundParamBtnTxBlProperty As DependencyProperty = DependencyProperty.RegisterAttached(
NameOf(ForegroundParamBtnTxBl),
GetType(Windows.Media.Brush),
GetType(StringParamWithButtonV),
New FrameworkPropertyMetadata(Windows.Media.Brushes.Black, FrameworkPropertyMetadataOptions.[Inherits]))
' Declare a get accessor method.
Public Shared Function GetForegroundParamBtnTxBl(element As StringParamWithButtonV) As Windows.Media.Brush
Return DirectCast(element.GetValue(ForegroundParamBtnTxBlProperty), Windows.Media.Brush)
End Function
' Declare a set accessor method.
Public Shared Sub SetForegroundParamBtnTxBl(element As StringParamWithButtonV, value As Windows.Media.Brush)
element.SetValue(ForegroundParamBtnTxBlProperty, value)
End Sub
Public Property ForegroundParamBtnTxBl As Windows.Media.Brush
Get
Return DirectCast(GetValue(ForegroundParamBtnTxBlProperty), Windows.Media.Brush)
End Get
Set(ByVal value As Windows.Media.Brush)
SetValue(ForegroundParamBtnTxBlProperty, value)
End Set
End Property
' ---------------------------------------------------------------------------------------------------------------------------------------------------------
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(StringParamWithButtonV))
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
Public Shared ReadOnly ParamVisibilityProperty As DependencyProperty =
DependencyProperty.Register("ParamVisibility", GetType(Visibility), GetType(StringParamWithButtonV))
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(StringParamWithButtonV))
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(StringParamWithButtonV))
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 AutoToolParamCheckedProperty As DependencyProperty =
DependencyProperty.Register("AutoToolParamChecked", GetType(Boolean), GetType(StringParamWithButtonV), New FrameworkPropertyMetadata() With {.BindsTwoWayByDefault = True})
Public Property AutoToolParamChecked As Boolean
Get
Return CType(GetValue(AutoToolParamCheckedProperty), Boolean)
End Get
Set(ByVal value As Boolean)
SetValue(AutoToolParamCheckedProperty, value)
End Set
End Property
Public Shared AutoToolParamEnabledProperty As DependencyProperty =
DependencyProperty.Register("AutoToolParamEnabled", GetType(Boolean), GetType(StringParamWithButtonV), New FrameworkPropertyMetadata() With {.BindsTwoWayByDefault = True})
Public Property AutoToolParamEnabled As Boolean
Get
Return CType(GetValue(AutoToolParamEnabledProperty), Boolean)
End Get
Set(ByVal value As Boolean)
SetValue(AutoToolParamEnabledProperty, value)
End Set
End Property
#Region "EGTTEXTBOX"
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~GESTIONE BACKGROUNDCOLOR TEXTBOX~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Public Shared ReadOnly GeneralBackgroundProperty As DependencyProperty = DependencyProperty.RegisterAttached(
NameOf(GeneralBackground),
GetType(Brush),
GetType(StringParamWithButtonV),
New FrameworkPropertyMetadata(DirectCast(New BrushConverter().ConvertFromString("#FFFFFF"), Brush),
New PropertyChangedCallback(AddressOf GeneralBackground_PropertyChanged)) With {.BindsTwoWayByDefault = True})
' Declare a get accessor method.
Public Shared Function GetGeneralBackground(element As StringParamWithButtonV) As Brush
Return DirectCast(element.GetValue(GeneralBackgroundProperty), Brush)
End Function
' Declare a set accessor method.
Public Shared Sub SetGeneralBackground(element As StringParamWithButtonV, value As Brush)
element.SetValue(GeneralBackgroundProperty, value)
End Sub
' Declare public property.
Public Property GeneralBackground As Brush
Get
Return CType(GetValue(GeneralBackgroundProperty), Brush)
End Get
Set(value As Brush)
SetValue(GeneralBackgroundProperty, value)
End Set
End Property
' Declare method invoke by changing property.
Private Shared Sub GeneralBackground_PropertyChanged(sender As DependencyObject, e As DependencyPropertyChangedEventArgs)
Dim TempMe As StringParamWithButtonV = DirectCast(sender, StringParamWithButtonV)
End Sub
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~GESTIONE FOREGROUNDCOLOR TEXTBOX~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Public Shared ReadOnly GeneralForegroundProperty As DependencyProperty = DependencyProperty.RegisterAttached(
NameOf(GeneralForeground),
GetType(Brush),
GetType(StringParamWithButtonV),
New FrameworkPropertyMetadata(SystemColors.WindowTextBrush, New PropertyChangedCallback(AddressOf GeneralForeground_PropertyChanged)) With {.BindsTwoWayByDefault = True})
' Declare a get accessor method.
Public Shared Function GetForegroundParamTxBx(element As StringParamWithButtonV) As Brush
Return DirectCast(element.GetValue(GeneralForegroundProperty), Brush)
End Function
' Declare a set accessor method.
Public Shared Sub SetForegroundParamTxBx(element As StringParamWithButtonV, value As Brush)
element.SetValue(GeneralForegroundProperty, value)
End Sub
' Declare public property.
Public Property GeneralForeground As Brush
Get
Return CType(GetValue(GeneralForegroundProperty), Brush)
End Get
Set(value As Brush)
SetValue(GeneralForegroundProperty, value)
End Set
End Property
' Declare method invoke by changing property.
Private Shared Sub GeneralForeground_PropertyChanged(sender As DependencyObject, e As DependencyPropertyChangedEventArgs)
Dim TempMe As StringParamWithButtonV = DirectCast(sender, StringParamWithButtonV)
End Sub
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~GESTIONE BORDERBRUSHCOLOR TEXTBOX~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Public Shared ReadOnly GeneralBorderBrushProperty As DependencyProperty = DependencyProperty.RegisterAttached(
NameOf(GeneralBorderBrush),
GetType(Brush),
GetType(StringParamWithButtonV),
New FrameworkPropertyMetadata(DirectCast(New BrushConverter().ConvertFromString("#CFD1D4"), Brush),
New PropertyChangedCallback(AddressOf GeneralBorderBrush_PropertyChanged)) With {.BindsTwoWayByDefault = True})
' Declare a get accessor method.
Public Shared Function GetGeneralBorderBrush(element As StringParamWithButtonV) As Brush
Return DirectCast(element.GetValue(GeneralBorderBrushProperty), Brush)
End Function
' Declare a set accessor method.
Public Shared Sub SetGeneralBorderBrush(element As StringParamWithButtonV, value As Brush)
element.SetValue(GeneralBorderBrushProperty, value)
End Sub
' Declare public property.
Public Property GeneralBorderBrush As Brush
Get
Return CType(GetValue(GeneralBorderBrushProperty), Brush)
End Get
Set(value As Brush)
SetValue(GeneralBorderBrushProperty, value)
End Set
End Property
' Declare method invoke by changing property.
Private Shared Sub GeneralBorderBrush_PropertyChanged(sender As DependencyObject, e As DependencyPropertyChangedEventArgs)
Dim TempMe As StringParamWithButtonV = DirectCast(sender, StringParamWithButtonV)
End Sub
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~GESTIONE BORDERBRUSISMOUSEOVER TEXTBOX~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' Gestione BorderBrushIsMouseOver textbox
Public Shared ReadOnly BorderBrushIsMouseOverProperty As DependencyProperty = DependencyProperty.RegisterAttached(
NameOf(BorderBrushIsMouseOver),
GetType(Brush),
GetType(StringParamWithButtonV),
New FrameworkPropertyMetadata(DirectCast(New BrushConverter().ConvertFromString("#7EB4EA"), Brush),
New PropertyChangedCallback(AddressOf BorderBrushIsMouseOver_PropertyChanged)) With {.BindsTwoWayByDefault = True})
' Declare a get accessor method.
Public Shared Function GetBorderBrushIsMouseOver(element As StringParamWithButtonV) As Brush
Return DirectCast(element.GetValue(BorderBrushIsMouseOverProperty), Brush)
End Function
' Declare a set accessor method.
Public Shared Sub SetBorderBrushIsMouseOver(element As StringParamWithButtonV, value As Brush)
element.SetValue(BorderBrushIsMouseOverProperty, value)
End Sub
' Declare public property.
Public Property BorderBrushIsMouseOver As Brush
Get
Return CType(GetValue(BorderBrushIsMouseOverProperty), Brush)
End Get
Set(value As Brush)
SetValue(BorderBrushIsMouseOverProperty, value)
End Set
End Property
' Declare method invoke by changing property.
Private Shared Sub BorderBrushIsMouseOver_PropertyChanged(sender As DependencyObject, e As DependencyPropertyChangedEventArgs)
Dim TempMe As StringParamWithButtonV = DirectCast(sender, StringParamWithButtonV)
End Sub
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~GESTIONE BORDERBRUSHISMOUSERFOCUSED TEXTBOX~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Public Shared ReadOnly BorderBrushIsFocusedProperty As DependencyProperty = DependencyProperty.RegisterAttached(
NameOf(BorderBrushIsFocused),
GetType(Brush),
GetType(StringParamWithButtonV),
New FrameworkPropertyMetadata(DirectCast(New BrushConverter().ConvertFromString("#569DE5"), Brush),
New PropertyChangedCallback(AddressOf BorderBrushIsFocused_PropertyChanged)) With {.BindsTwoWayByDefault = True})
' Declare a get accessor method.
Public Shared Function GetBorderBrushIsFocused(element As StringParamWithButtonV) As Brush
Return DirectCast(element.GetValue(BorderBrushIsFocusedProperty), Brush)
End Function
' Declare a set accessor method.
Public Shared Sub SetBorderBrushIsFocused(element As StringParamWithButtonV, value As Brush)
element.SetValue(BorderBrushIsFocusedProperty, value)
End Sub
' Declare public property.
Public Property BorderBrushIsFocused As Brush
Get
Return CType(GetValue(BorderBrushIsFocusedProperty), Brush)
End Get
Set(value As Brush)
SetValue(BorderBrushIsFocusedProperty, value)
End Set
End Property
' Declare method invoke by changing property.
Private Shared Sub BorderBrushIsFocused_PropertyChanged(sender As DependencyObject, e As DependencyPropertyChangedEventArgs)
Dim TempMe As StringParamWithButtonV = DirectCast(sender, StringParamWithButtonV)
End Sub
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~GESTIONE BACKGROUDBRDENABLE TEXTBOX~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Public Shared ReadOnly BackgroundBrdEnableProperty As DependencyProperty = DependencyProperty.RegisterAttached(
NameOf(BackgroundBrdEnable),
GetType(Brush),
GetType(StringParamWithButtonV),
New FrameworkPropertyMetadata(DirectCast(New BrushConverter().ConvertFromString("#FFFFFF"), Brush),
New PropertyChangedCallback(AddressOf BackgroundBrdEnable_PropertyChanged)) With {.BindsTwoWayByDefault = True})
' Declare a get accessor method.
Public Shared Function GetBackgroundBrdEnable(element As StringParamWithButtonV) As Brush
Return DirectCast(element.GetValue(BackgroundBrdEnableProperty), Brush)
End Function
' Declare a set accessor method.
Public Shared Sub SetBackgroundBrdEnable(element As StringParamWithButtonV, value As Brush)
element.SetValue(BackgroundBrdEnableProperty, value)
End Sub
' Declare public property.
Public Property BackgroundBrdEnable As Brush
Get
Return CType(GetValue(BackgroundBrdEnableProperty), Brush)
End Get
Set(value As Brush)
SetValue(BackgroundBrdEnableProperty, value)
End Set
End Property
' Declare method invoke by changing property.
Private Shared Sub BackgroundBrdEnable_PropertyChanged(sender As DependencyObject, e As DependencyPropertyChangedEventArgs)
Dim TempMe As StringParamWithButtonV = DirectCast(sender, StringParamWithButtonV)
End Sub
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~GESTIONE BACKGROUNDBRDDISABLE TEXTBOX~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' Gestione BackgroundBrdDisable textbox
Public Shared ReadOnly BackgroundBrdDisableProperty As DependencyProperty = DependencyProperty.RegisterAttached(
NameOf(BackgroundBrdDisable),
GetType(Brush),
GetType(StringParamWithButtonV),
New FrameworkPropertyMetadata(DirectCast(New BrushConverter().ConvertFromString("#FFFFFF"), Brush),
New PropertyChangedCallback(AddressOf BackgroundBrdDisable_PropertyChanged)) With {.BindsTwoWayByDefault = True})
' Declare a get accessor method.
Public Shared Function GetBackgroundBrdDisable(element As StringParamWithButtonV) As Brush
Return DirectCast(element.GetValue(BackgroundBrdDisableProperty), Brush)
End Function
' Declare a set accessor method.
Public Shared Sub SetBackgroundBrdDisable(element As StringParamWithButtonV, value As Brush)
element.SetValue(BackgroundBrdDisableProperty, value)
End Sub
' Declare public property.
Public Property BackgroundBrdDisable As Brush
Get
Return CType(GetValue(BackgroundBrdDisableProperty), Brush)
End Get
Set(value As Brush)
SetValue(BackgroundBrdDisableProperty, value)
End Set
End Property
' Declare method invoke by changing property.
Private Shared Sub BackgroundBrdDisable_PropertyChanged(sender As DependencyObject, e As DependencyPropertyChangedEventArgs)
Dim TempMe As StringParamWithButtonV = DirectCast(sender, StringParamWithButtonV)
End Sub
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~GESTIONE BACKGROUNDTXBLDISABLE TEXTBOX~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Public Shared ReadOnly BackgroundTxBlDisableProperty As DependencyProperty = DependencyProperty.RegisterAttached(
NameOf(BackgroundTxBlDisable),
GetType(Brush),
GetType(StringParamWithButtonV),
New FrameworkPropertyMetadata(Brushes.Gray, New PropertyChangedCallback(AddressOf BackgroundTxBlDisable_PropertyChanged)) With {.BindsTwoWayByDefault = True})
' Declare a get accessor method.
Public Shared Function GetBackgroundTxBlDisable(element As StringParamWithButtonV) As Brush
Return DirectCast(element.GetValue(BackgroundTxBlDisableProperty), Brush)
End Function
' Declare a set accessor method.
Public Shared Sub SetBackgroundTxBlDisable(element As StringParamWithButtonV, value As Brush)
element.SetValue(BackgroundTxBlDisableProperty, value)
End Sub
' Declare public property.
Public Property BackgroundTxBlDisable As Brush
Get
Return CType(GetValue(BackgroundTxBlDisableProperty), Brush)
End Get
Set(value As Brush)
SetValue(BackgroundTxBlDisableProperty, value)
End Set
End Property
' Declare method invoke by changing property.
Private Shared Sub BackgroundTxBlDisable_PropertyChanged(sender As DependencyObject, e As DependencyPropertyChangedEventArgs)
Dim TempMe As StringParamWithButtonV = DirectCast(sender, StringParamWithButtonV)
End Sub
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~GESTIONE FOREGROUNDTXBLENABLE TEXTBOX~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Public Shared ReadOnly ForegroundTxBlEnableProperty As DependencyProperty = DependencyProperty.RegisterAttached(
NameOf(ForegroundTxBlEnable),
GetType(Brush),
GetType(StringParamWithButtonV),
New FrameworkPropertyMetadata(SystemColors.WindowTextBrush, New PropertyChangedCallback(AddressOf ForegroundTxBlEnable_PropertyChanged)) With {.BindsTwoWayByDefault = True})
' Declare a get accessor method.
Public Shared Function GetForegroundTxBlEnable(element As StringParamWithButtonV) As Brush
Return DirectCast(element.GetValue(ForegroundTxBlEnableProperty), Brush)
End Function
' Declare a set accessor method.
Public Shared Sub SetForegroundTxBlEnable(element As StringParamWithButtonV, value As Brush)
element.SetValue(ForegroundTxBlEnableProperty, value)
End Sub
' Declare public property.
Public Property ForegroundTxBlEnable As Brush
Get
Return CType(GetValue(ForegroundTxBlEnableProperty), Brush)
End Get
Set(value As Brush)
SetValue(ForegroundTxBlEnableProperty, value)
End Set
End Property
' Declare method invoke by changing property.
Private Shared Sub ForegroundTxBlEnable_PropertyChanged(sender As DependencyObject, e As DependencyPropertyChangedEventArgs)
Dim TempMe As StringParamWithButtonV = DirectCast(sender, StringParamWithButtonV)
End Sub
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~GESTIONE FOREGROUNDTXBLDISABLE TEXTBOX~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Public Shared ReadOnly ForegroundTxBlDisableProperty As DependencyProperty = DependencyProperty.RegisterAttached(
NameOf(ForegroundTxBlDisable),
GetType(Brush),
GetType(StringParamWithButtonV),
New FrameworkPropertyMetadata(SystemColors.WindowTextBrush, New PropertyChangedCallback(AddressOf ForegroundTxBlDisable_PropertyChanged)) With {.BindsTwoWayByDefault = True})
' Declare a get accessor method.
Public Shared Function GetForegroundTxBlDisable(element As StringParamWithButtonV) As Brush
Return DirectCast(element.GetValue(ForegroundTxBlDisableProperty), Brush)
End Function
' Declare a set accessor method.
Public Shared Sub SetForegroundTxBlDisable(element As StringParamWithButtonV, value As Brush)
element.SetValue(ForegroundTxBlDisableProperty, value)
End Sub
' Declare public property.
Public Property ForegroundTxBlDisable As Brush
Get
Return CType(GetValue(ForegroundTxBlDisableProperty), Brush)
End Get
Set(value As Brush)
SetValue(ForegroundTxBlDisableProperty, value)
End Set
End Property
' Declare method invoke by changing property.
Private Shared Sub ForegroundTxBlDisable_PropertyChanged(sender As DependencyObject, e As DependencyPropertyChangedEventArgs)
Dim TempMe As StringParamWithButtonV = DirectCast(sender, StringParamWithButtonV)
End Sub
#End Region ' EgtTextBox
#Region "TOGGLE BUTTON STYLE"
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~GESTIONE BACKGROUNDCOLOR TOGGLE BUTTON~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Public Shared ReadOnly BackgroundIsCheckedProperty As DependencyProperty = DependencyProperty.RegisterAttached(
NameOf(BackgroundIsChecked),
GetType(Brush),
GetType(StringParamWithButtonV),
New FrameworkPropertyMetadata(DirectCast(New BrushConverter().ConvertFromString("#DDDDDD"), Brush),
New PropertyChangedCallback(AddressOf BackgroundIsChecked_PropertyChanged)) With {.BindsTwoWayByDefault = True})
' Declare a get accessor method.
Public Shared Function GetBackgroundIsChecked(element As StringParamWithButtonV) As Brush
Return DirectCast(element.GetValue(BackgroundIsCheckedProperty), Brush)
End Function
' Declare a set accessor method.
Public Shared Sub SetBackgroundIsChecked(element As StringParamWithButtonV, value As Brush)
element.SetValue(BackgroundIsCheckedProperty, value)
End Sub
' Declare public property.
Public Property BackgroundIsChecked As Brush
Get
Return CType(GetValue(BackgroundIsCheckedProperty), Brush)
End Get
Set(value As Brush)
SetValue(BackgroundIsCheckedProperty, value)
End Set
End Property
' Declare method invoke by changing property.
Private Shared Sub BackgroundIsChecked_PropertyChanged(sender As DependencyObject, e As DependencyPropertyChangedEventArgs)
Dim TempMe As StringParamWithButtonV = DirectCast(sender, StringParamWithButtonV)
End Sub
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~GESTIONE FOREGROUNDCOLOR TOGGLE BUTTON~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Public Shared ReadOnly ForegroundIsCheckedProperty As DependencyProperty = DependencyProperty.RegisterAttached(
NameOf(ForegroundIsChecked),
GetType(Brush),
GetType(StringParamWithButtonV),
New FrameworkPropertyMetadata(SystemColors.WindowTextBrush, New PropertyChangedCallback(AddressOf ForegroundIsChecked_PropertyChanged)) With {.BindsTwoWayByDefault = True})
' Declare a get accessor method.
Public Shared Function GetForegroundIsChecked(element As StringParamWithButtonV) As Brush
Return DirectCast(element.GetValue(ForegroundIsCheckedProperty), Brush)
End Function
' Declare a set accessor method.
Public Shared Sub SetForegroundIsChecked(element As StringParamWithButtonV, value As Brush)
element.SetValue(ForegroundIsCheckedProperty, value)
End Sub
' Declare public property.
Public Property ForegroundIsChecked As Brush
Get
Return CType(GetValue(ForegroundIsCheckedProperty), Brush)
End Get
Set(value As Brush)
SetValue(ForegroundIsCheckedProperty, value)
End Set
End Property
' Declare method invoke by changing property.
Private Shared Sub ForegroundIsChecked_PropertyChanged(sender As DependencyObject, e As DependencyPropertyChangedEventArgs)
Dim TempMe As StringParamWithButtonV = DirectCast(sender, StringParamWithButtonV)
End Sub
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~GESTIONE BORDERBRUSHCOLOR TOGGLE BUTTON~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Public Shared ReadOnly BorderBrushIsCheckedProperty As DependencyProperty = DependencyProperty.RegisterAttached(
NameOf(BorderBrushIsChecked),
GetType(Brush),
GetType(StringParamWithButtonV),
New FrameworkPropertyMetadata(DirectCast(New BrushConverter().ConvertFromString("#707070"), Brush),
New PropertyChangedCallback(AddressOf BorderBrushIsChecked_PropertyChanged)) With {.BindsTwoWayByDefault = True})
' Declare a get accessor method.
Public Shared Function GetBorderBrushIsChecked(element As StringParamWithButtonV) As Brush
Return DirectCast(element.GetValue(ForegroundIsCheckedProperty), Brush)
End Function
' Declare a set accessor method.
Public Shared Sub SetBorderBrushIsChecked(element As StringParamWithButtonV, value As Brush)
element.SetValue(ForegroundIsCheckedProperty, value)
End Sub
' Declare public property.
Public Property BorderBrushIsChecked As Brush
Get
Return CType(GetValue(BorderBrushIsCheckedProperty), Brush)
End Get
Set(value As Brush)
SetValue(BorderBrushIsCheckedProperty, value)
End Set
End Property
' Declare method invoke by changing property.
Private Shared Sub BorderBrushIsChecked_PropertyChanged(sender As DependencyObject, e As DependencyPropertyChangedEventArgs)
Dim TempMe As StringParamWithButtonV = DirectCast(sender, StringParamWithButtonV)
End Sub
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~SPESSORE BORDER TOGGLE BUTTON~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' Proprietà che permette di impostare l'altezza della TitleBar
Public Shared ReadOnly BorderThicknessIsCheckedProperty As DependencyProperty = DependencyProperty.RegisterAttached(
NameOf(BorderThicknessIsChecked),
GetType(String),
GetType(StringParamWithButtonV),
New FrameworkPropertyMetadata("1.0", FrameworkPropertyMetadataOptions.[Inherits]))
' Declare a get accessor method.
Public Shared Function GetBorderThicknessIsChecked(element As StringParamWithButtonV) As String
Return DirectCast(element.GetValue(BorderThicknessIsCheckedProperty), String)
End Function
' Declare a set accessor method.
Public Shared Sub SetBorderThicknessIsChecked(element As StringParamWithButtonV, value As String)
element.SetValue(BorderThicknessIsCheckedProperty, value)
End Sub
Public Property BorderThicknessIsChecked As String
Get
Return DirectCast(GetValue(BorderThicknessIsCheckedProperty), String)
End Get
Set(ByVal value As String)
SetValue(BorderThicknessIsCheckedProperty, value)
End Set
End Property
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~OPACITA' TOGGLE BUTTON~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' Proprietà che permette di impostare l'altezza della TitleBar
Public Shared ReadOnly OpacityIsCheckedProperty As DependencyProperty = DependencyProperty.RegisterAttached(
NameOf(OpacityIsChecked),
GetType(Double),
GetType(StringParamWithButtonV),
New FrameworkPropertyMetadata(0.3, FrameworkPropertyMetadataOptions.[Inherits]))
' Declare a get accessor method.
Public Shared Function GetOpacityIsChecked(element As StringParamWithButtonV) As Double
Return DirectCast(element.GetValue(OpacityIsCheckedProperty), Double)
End Function
' Declare a set accessor method.
Public Shared Sub SetOpacityIsChecked(element As StringParamWithButtonV, value As Double)
element.SetValue(OpacityIsCheckedProperty, value)
End Sub
Public Property OpacityIsChecked As Double
Get
Return DirectCast(GetValue(OpacityIsCheckedProperty), Double)
End Get
Set(ByVal value As Double)
SetValue(OpacityIsCheckedProperty, value)
End Set
End Property
#End Region ' Toggle Button Style
End Class