HeaderPane
Main
Hide
Share Link
Print

Culture Property, SftMask Class

Defines the culture that provides the decimal and group separators, the digit grouping, the currency symbol, the date and time separators and the case conversion.

Class: SftMask
Namespace: Softelvdm.SftMaskNET
Assembly: Softelvdm.SftMaskNET

Syntax

public CultureInfo Culture { get; set; }
Public Property Culture As CultureInfo

Value

The culture, or null for the current culture of the thread at the time the control is created or the property is set.

Comments

Defines the culture that provides the decimal and group separators, the digit grouping, the currency symbol, the date and time separators and the case conversion.

Examples

C# View entire sample code

        // The text of the field with the input focus, in two forms, and its value.
        private void ShowValues(SftMask field) {
            if (field.UseSystemPasswordChar) {
                labelValues.Text = "Text: (not shown)";
                return;
            }
            labelValues.Text = "Text: \"" + field.Text + "\"    TextNoLiterals: \"" + field.TextNoLiterals + "\"    Value: " +
                (field.Value.HasValue ? field.Value.Value.ToString(field.Culture) : "(none)");
        }

        private void sftMaskColor_ValueChanged(object sender, EventArgs e) {
            ShowColor();
        }

        // The hexadecimal field holds an RGB color.
        private void ShowColor() {

VB.NET View entire sample code

    ' The text of the field with the input focus, in two forms, and its value.
    Private Sub ShowValues(ByVal field As SftMask)
        If field.UseSystemPasswordChar Then
            LabelValues.Text = "Text: (not shown)"
            Return
        End If
        Dim value As String = "(none)"
        If field.Value.HasValue Then
            value = field.Value.Value.ToString(field.Culture)
        End If
        LabelValues.Text = "Text: """ + field.Text + """    TextNoLiterals: """ + field.TextNoLiterals + """    Value: " + value
    End Sub

    Private Sub SftMaskColor_ValueChanged(ByVal sender As Object, ByVal e As EventArgs) Handles SftMaskColor.ValueChanged
        ShowColor()
    End Sub

See Also SftMask Class | Classes | SftMask/NET 3.0