Hi there,
I have implemented XamDayView control and I have changed the default Appointment Dialog with my custom dialog popup. However I have noticed that the title of my custom window is set to the Subject property of the respective appointment object. Even though I have set a binding in my view, the Title still gets the value of the Subject property. Is there a way to change that ?
Thank you in advance.
Christos
Hello Christos,
I have been investigating the behavior you are looking to achieve, and I would just like to gather a few more details on this custom dialog popup that you are implementing. Would it be possible for you to please provide some more information on the binding that you are setting in your view that you are expecting to change the title of the dialog?
Also, are you following the instructions at this documentation article about creation of a custom activity dialog or are you perhaps doing this in another way?
Please let me know if you have any other questions or concerns on this matter.
Hi Andrew,
Thank you for the quick reply. I have managed to fix the problem. Indeed I followed the guide you attached and through CreateActivityDialog method I returned my own custom Window. In the view of my custom window, inside the <Window> tag I set Title="{Binding TimeTakenText}" and that didn't work, the Subject property of my custom appointment object was still shown as the Title. The fix was to do the binding in the code-behind file like that:
Binding timeTakenTextBinding = new Binding { Source = DataContext, Path = new PropertyPath("TimeTakenText"), UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged }; BindingOperations.SetBinding(this, Window.TitleProperty, timeTakenTextBinding);
Thanks for your time,