I am working on one assignment to Create a user control inheriting a text box which would allow only capital alphabets. i am still working with it. below is the code which i have worked till now.
Imports System.ComponentModel
Imports System.Windows.Controls
Partial Public Class textboxupper_uc
Inherits TextBox
Dim strUpperText As String
Sub New()
InitializeComponent()
End Sub
Public Property uppText As String
Get
Return strUpperText
End Get
Set(value As String)
strUpperText = value.ToUpper
End Set
End Property
End Class
the line Inherits TextBox giving error as "Base class "TextBox" specified for class 'textboxupper_uc' can not be different from the base class 'user control' of one of its other partial types."
CharacterCasingproperty of a standardTextBoxtoUpperand then anything typed in will be displayed in upper-case.