wpf - Enable Button and DelegateCommand -


How can I disable a button as long as the required data is Textbox ? I'm compelling the public ICommand LoginCommand {if (_loginCommand =)

I button to ICommand :

 = Null) {_loginCommand = New DelegateCommand & lt; String & gt; (This.login, this.iswildid); } Return _ login prompt; }}  

like this:

  & gt; Button style = "{StaticResource LoginButton}" content = "login" command = "{binding login command}" commandpalmter = "{binding text, elementname = TSTUSUSERNAME}" />  

You need to increase the requery event, it's easy with a delegation command < / P>

  Public class MyViewModel:   

Also, if there is no concrete reason to build your property type representative, then you should do this. View Module {Private string _myTextField; Public string MyTextField {get {_myTextField; } Set {_myTextField = value; OnPropertyChanged ("MyTextField"); // Here is the magic log-in command. Ricex Expect switch (); }} Public Representative column & lt; String & gt; Login comand {get; Set; } Public MyViewModel () {login commm = new representative com & lt; String & gt; (Login, canonology); } Public Bull canonology (string text) {return! String.isnaloractic (text); } Public Zero login (string text) {// login logic}}

This is too much.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -