[VS2012] Como bindear esta variable en un WPF?

(1/1)

Eleкtro:
Hola,

Tengo un problema, no se como puedo bindear una variable, estoy intentando modificar el texto por defecto de un textbox...

PD: Es un WPF.


En el form del mainwindow:

Código
Public Sub Button_Click_2(sender As Object, e As RoutedEventArgs)
 
   Dim usbmon_path As String
   usbmon_path = System.IO.Directory.GetCurrentDirectory & "\USB MON"
 
   Dim W2 As New Window2
   W2.Show()
 
End Sub

(Eso crea la variable usbmon_path, y abre el "window2", bien)



en el window2.xaml::

Código
<TextBox ..blabla...  Text="{Binding usbmon_path}"  ...blabla/>



No me sale ningún error, pero el texto sale vacío, ¿Que estoy haciendo mal?

gracias por leer!

Navegación

[0] Índice de Mensajes