Hi,
how can you enable a right mouse click to select an activity?
Hello,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
If the above suggestion helped you solve your issue please verify the thread as answered so other users may take better advantage of it.
How do you mark something as answered?
I'm using the xamoutlookcalendarview control with the MVVM pattern and I'm unable to change the appointments on the control once I've bound the data the first time. I'm setting the data by: DataManager="{Binding CalDataManager, Mode=TwoWay}". Please help.
thanks
thanks for the quick response. I actually found the problem in my code as well. I was creating a new instance of the data manager every time I change the underlying data when all I had to do was use the same data manager and change the appointment and resource sources.
I have been looking into your last reply, however I am not sure how does this interfere with your MVVVM pattern since all this is strictly confined within the view and its functionality itself. If you insist on keeping your view’s code behind clean I can suggest creating your own custom class that would only inherit from a schedule control and add this style to its. I have created a simple class snippet to get you started:
public class MyXamOutlookCalendarView : XamOutlookCalendarView { public MyXamOutlookCalendarView() : base() { Style test = new Style(typeof(AppointmentPresenter)); test.Setters.Add(new EventSetter(AppointmentPresenter.MouseRightButtonDownEvent, new MouseButtonEventHandler(app_MouseRightButtonDown))); this.Resources.Add(typeof(AppointmentPresenter), test); } void app_MouseRightButtonDown(object sender, MouseButtonEventArgs e) { this.SelectedActivities.Add((sender as AppointmentPresenter).Activity); } }
Please let me know, if you require any further clarification on the matter.