我需要擺脫在 infragistics 的 XamMonthCalendar 控制元件中懸停一天后顯示的“單擊以添加事件”按鈕。直到現在,我在網路上只發現了損壞的鏈接。我試圖“編輯”控制元件模板的副本,但我一開始就得到了這個,我不知道如何深入研究它。好像我必須修改 ScheduleStackPanel。誰能告訴我一條路?
<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>
uj5u.com熱心網友回復:
xamMonthView 只是計劃視圖控制元件之一,因此影響該功能的設定位于提供計劃資料的組件 - xamScheduleDataManager。要禁用該功能,可以將XamScheduleDataManager 設定的AppointmentSettings的IsAddViaClickToAddEnabled設定為false。請注意,對于所有活動型別,您可能/可能需要將其設定為 false - 即 TaskSettings 和 JournalSettings。
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/535125.html
標籤:wpf基础设施控制模板
