I feel my delay. I had work.
First of all, thank you for reply.
I explain: I do not know use the code of the original web page in VB.NET.
Gillard made the translation from C (and thank you) but some things VB.NET
does not recognize them (for example, some "imports"). I do not also know use
the part of the code that begins for " <Page ... ", though VB.NET admits this
code if in front of every line write three characters of commentary ( ''' ).
If someone knows the method to realize this example in VB.NET I'll be very
grateful and probably many people because it is a code interesting (that
those of Microsoft might have written it also for VB).
Thank you very much again.
This is the code:
Original site (in English):
http://msdn.microsoft.com/en-us/library/bb613590.aspx
Translation made by Gillard:
Imports System
Imports System.Windows
Imports System.Windows. Input
Imports System.Windows. Controls
Imports System.Windows. Media
Imports System.Windows. Media.Imaging
Namespace SDKSample
Partial Public Class TextBoxBackgrou ndExample
Inherits Page
Private Sub OnTextBoxTextCh anged(ByVal sender As Object, ByVal e As
TextChangedEven tArgs)
If myTextBox.Text = "" Then
' Create an ImageBrush.
Dim textImageBrush As New ImageBrush()
textImageBrush. ImageSource = New BitmapImage(New
Uri("TextBoxBac kground.gif", UriKind.Relativ e))
textImageBrush. AlignmentX = AlignmentX.Left
textImageBrush. Stretch = Stretch.None
' Use the brush to paint the button's background.
myTextBox.Backg round = textImageBrush
Else
myTextBox.Backg round = Nothing
End If
End Sub
End Class
End Namespace