I need to get rid of the "Click to add event" button that's showing up after a second when hovering over a day in infragistics' XamMonthCalendar control. I found just nothing than broken links in the web until now. I tried to "edit a copy" of the control template, but I just got this in the first place and I don't know how to dig deeper into it. Seems like I would have to modify ScheduleStackPanel. Could anyone show me a path?
<Style TargetType="{x:Type igSchedule:XamMonthView}">
<Setter Property="FontFamily" Value="Segoe UI"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type igSchedule:XamMonthView}">
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
<Grid x:Name="RootPanel">
<ig:GridBagPanel SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
<igSchedulePrim:ScheduleStackPanel x:Name="GroupHeadersPanel" Visibility="{TemplateBinding CalendarHeaderAreaVisibilityResolved}"/>
<igSchedulePrim:ScheduleStackPanel x:Name="GroupsPanel"/>
<ScrollBar x:Name="WeekScrollBar" Orientation="Vertical" Style="{TemplateBinding ScrollBarStyle}"/>
<ScrollBar x:Name="TimeslotGroupScrollBar" Orientation="Horizontal" Style="{TemplateBinding ScrollBarStyle}"/>
</ig:GridBagPanel>
<ContentControl x:Name="ErrorDisplay" Content="{Binding BlockingError, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource BlockingErrorStyle}" Visibility="Collapsed"/>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
CodePudding user response:
The xamMonthView is just one of the schedule view controls so the settings that affect that functionality are on the component that provides the schedule data - the xamScheduleDataManager. To disable that ability one would set the IsAddViaClickToAddEnabled to false for the AppointmentSettings of the Settings of the XamScheduleDataManager. Note you might/probably need to set that to false for all the activity types - namely TaskSettings and JournalSettings too.