2.7.4
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user