Hi,
I am using attached XAML ResourceDictionary file (extension changed because of file upload types) as appointment class.
In this, I have added a ListView with a textbox and combobox and trying to populate data using two buttons.
Setup:
1. Added this XAML file to my project.
2. Added a class in this ScheduleResource XAML file for code behind.
3. Added a listview and two buttons in ScheduleResource XAML file.
4. Now the click events for this two buttons are added in the code behind class.
5. I created another class to map the Appointment class properties.
6. I have another Window which has xamMonthView say this class is MonthCalendar.
7. Now, when I load and open the month view -> Appointment, I can see my ListView and two buttons.
But when I try to add items to the listView they are not getting added.
Please can you tell me what I am missing here?
Regards,
Raj
Also, it would be greatly helpful to me if I can know how to get the current instance of the Appointment dialog.
Like, if I double click on a xamMonthView, how can I get the pop-up appointment dialog window?
Hello Nag,
Thank you for your posts.
I have been looking into it and I am not completely sure that I understand correctly your requirements and what you try to achieve. Would you please provide me with more details about:
- What items should be added to the listview?
- Should the appointments, that are in the MontView, be added to the ListView?
- Should they be added when the user clicks on of the two button mentioned in your initial post?
Looking forward to hearing from you.
Thank you very much for your reply.
1. I kept 3 strings and a List<String> in the ListView.
2. I am not talking about adding MonthView Appointments to a listview here.
I added XamMonthView to the form. A DataManager and ScheduleConnector. In the ScheduleConnector, I mapped properties.
The extra mapped property is the ListView.
When the user double clicks on the monthview, appointment will be popped up with Subject, Local, Start Date, End Date, my ListView in a Grid, my two buttons (add and delete buttons).
When I click "Add" button, I am adding the ListView items (3 strings and a List<string>).
So now, I want to update the Appointment window dynamically with the ListView items. I can then add my subject, select start and end dates and select rucurrences and save the appointment.
Also, when I double click on the month view, a title less Appointment window pops-up. Can I get a reference to this window from the code behind?
Thanks and Regards,
Thank you for your post.
I have been looking into it. About your question for adding items to the listView with Add button, what I can suggest is to get the ListView by using sender in the handler of add button and add items to it. About your question for Appointment window popup reference, what I can suggest is to add EventSetter in the style for AppointmentDialogCore in your ScheduleResource file. By using EventSetter you can handle the Loaded event of AppointmentDialogCore and get the current Appointment in the event handler.
I created a sample application based on your scenario, your steps and the ScheduleResources file that you have provided. If I misunderstood your requirements, would you please modify the attached sample application with the functionality, that you are using, so it reproduces the issue or send me and an isolated sample application. This way I would be able to further investigate this for you and provide you with more detailed information on this matter.
Please let me know if you need any further assistance on the matter.
I am just checking if there is anything else I can do for you.