-1

I am developing a WPF Application in VB. I am using Windows Authentication. I have followed the steps listed here:

How to use Windows Authentication in WPF?

I would like to show what the username is in a text box which I do not know how to. Do I have to bind the text box?

Community
  • 1
  • 1
presarioruby
  • 304
  • 4
  • 11

1 Answers1

2

Yes.

Assuming that Username is the property representing your username, the following markup should bind the username to your Text property in your TextBox:

<TextBox Text="{Binding Username}"/>

Note: In order to automatically update your View when Username changes, make sure you implement INotifyPropertyChanged and set up the property correctly in order to notify the View when any changes were made.

0x8BADF00D
  • 962
  • 1
  • 8
  • 18