Files
bodyshop-uploader/BodyshopUploader/ViewModels/LoginViewModel.commands.cs
2024-03-20 14:30:48 -07:00

25 lines
653 B
C#

using System;
using System.Windows;
using System.Windows.Input;
namespace ProManagerPartner.ViewModels
{
public partial class LoginViewModel : BaseViewModel
{
private ICommand _loginCommand;
public ICommand LoginCommand
{
get
{
if (_loginCommand == null)
{
_loginCommand = new RelayCommand(
p => !string.IsNullOrEmpty(UserName) && UserPassword?.Length > 5,
async p => { await LoginAsync(p as Window); });
}
return _loginCommand;
}
}
}
}