public class PopupViewModel : INotifyPropertyChanged
{
bool isOpen;
public event PropertyChangedEventHandler PropertyChanged;
public void OnPropertyChanged(string propertyName)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
public ICommand PopupAcceptCommand { get; set; }
public ICommand PopupDeclineCommand { get; set; }
public ICommand PopupCommand { get; set; }
public bool PopupOpen
{
get
{
return isOpen;
}
set
{
isOpen = value;
OnPropertyChanged(nameof(PopupOpen));
}
}
public PopupViewModel()
{
// canExecute() will be execute the PopupAccept Method
PopupAcceptCommand = new Command(PopupAccept);
//canExecute() will be execute the PopupDecline method
PopupDeclineCommand = new Command(PopupDecline);
PopupCommand = new Command(Popup);
}
private void Popup()
{
PopupOpen = true;
}
private void PopupAccept()
{
// You can write your set of codes that needs to be executed.
}
private void PopupDecline()
{
// You can write your set of codes that needs to be executed.
}
}
}
I given the button inside sfschedule datatemplate. Once i click the button, I would like to open the Popup and get the related data inside the popup further event.
And when the change month in schedule i can't see the events. I can see only current month events.
Kindly please guide me.