This commit is contained in:
Developer01
2025-12-05 14:03:07 +01:00
parent 443242415a
commit c29c508224
6 changed files with 223 additions and 81 deletions

View File

@@ -2,6 +2,7 @@
Imports System.ComponentModel.Design
Imports System.Drawing.Design
Imports System.Globalization
Imports DevExpress.XtraPrinting.Native
Imports DigitalData.Modules.Language.Utils
Public Module ModuleControlProperties
@@ -71,7 +72,33 @@ Public Module ModuleControlProperties
<DisplayName("Text Alignement")>
<Category(ClassConstants.CAT_DISPLAY)>
<TypeConverter(GetType(TextAlignmentConverter))>
Public Property TextAlignment As String
' Converter für Dropdown-Werte Near/Center/Far
Public Class TextAlignmentConverter
Inherits TypeConverter
Public Overrides Function GetStandardValuesSupported(context As ITypeDescriptorContext) As Boolean
Return True
End Function
' Optional: True, damit nur die vorgegebenen Werte erlaubt sind
Public Overrides Function GetStandardValuesExclusive(context As ITypeDescriptorContext) As Boolean
Return True
End Function
Public Overrides Function GetStandardValues(context As ITypeDescriptorContext) As StandardValuesCollection
Dim values = New List(Of String) From {"Near", "Center", "Far"}
Return New StandardValuesCollection(values)
End Function
Public Overrides Function ConvertTo(context As ITypeDescriptorContext, culture As CultureInfo, value As Object, destinationType As Type) As Object
If destinationType Is GetType(String) Then
Return If(value Is Nothing, "", value.ToString())
End If
Return MyBase.ConvertTo(context, culture, value, destinationType)
End Function
End Class
Class FontConverter
Inherits TypeConverter