How can "Click To Add Appointment" be disabled in WPF?
There's no property currently exposed to disable it but the element is a ClickToAddActivityElement so you could change its template to not have anything visible or set its Opacity/IsHitTestVisible so it won't be visible or interactive. E.g.
<Style TargetType="igPrim:ClickToAddActivityElement"> <Setter Property="Opacity" Value="0" /> <Setter Property="IsHitTestVisible" Value="False" /></Style>
Where am I supposed to place this code?
I use that code so it has error : Type 'igPrim:ClickToAddActivityElement' was not found.
And I not see any type 'igPrim:ClickToAddActivityElement' in file "generic.shared.xaml".
Have I got some wrong?
Well in the generic.shared.xaml it would not be referred to as igPrim:ClickToAddActivityElement since the URI syntax does not work on the local assembly so when we write the xaml that is embedded in our assembly we have to use a different prefix. If you just search for ClickToAddActivityElement then you will find it.
I see that : When I add Appointments by hide code then Click to Add Appointment not be disabled.
What I do to disabled this dialog in this case.
Thanks for help.
I'm sorry but I don't understand the issue you are having. Can you provide a sample that demonstrates the issue and steps when running the sample? Or perhaps provide a more detailed description with screenshots?
I implement to add some Appoiments by hide code. For dont want users add Appoiments by
Dialog I add:
So I see that, it still allow user add Appoiments by Dialog.
it is OK, thanks for help.
The ClickToAddActivityElement has nothing to do with the dialog; that simply relates to the "Click to Add Appointment" prompt that is displayed within a timeslot when you hover over it. If you don't want users to add using the activity dialog (i.e. what you see when you double click on a timeslot) then you can handle the ActivityDialogDisplaying event and set e.Cancel to true as needed (e.g. if the DataItem is null). If you are using 11.1 then you can set the IsAddViaDoubleClickEnabled on the ScheduleSettings->AppointmentSettings to false.