Version

CalendarItemGroup Class

Represents a group of calendar items within a XamMonthCalendar - e.g. a specific month of the year.
Syntax
'Declaration
 
Public Class CalendarItemGroup 
   Inherits System.Windows.Controls.Control
public class CalendarItemGroup : System.Windows.Controls.Control 
Remarks

A CalendarItemGroup is used to represent a group of CalendarItem instances. Based on the CurrentCalendarMode, the group will contain items that represent either days, months, years, decades or centuries.

Example
The following sample demonstrates how to use the ReferenceGroupOffset when siting CalendarItemGroups directly within the template of the XamMonthCalendar instead of using a CalendarItemGroupPanel.

<UserControl x:Class="Xaml.UserControl1"
    
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    
xmlns:sys="clr-namespace:System;assembly=mscorlib"
    
xmlns:igEditors="http://infragistics.com/Editors"
    
xmlns:igThemes="http://infragistics.com/Themes">
    
<UserControl.Resources>
        
<ControlTemplate x:Key="PreviewNextPreviousMonths" TargetType="{x:Type igEditors:XamMonthCalendar}">
            
<Border>
                
<DockPanel>
                    
<ToolBar DockPanel.Dock="Bottom">
                        
<Button Command="{x:Static igEditors:MonthCalendarCommands.ScrollPreviousGroup}" 
                                
CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                                
Content="&lt;" />
                        
<Button Command="{x:Static igEditors:MonthCalendarCommands.ScrollNextGroup}" 
                                
CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                                
Content="&gt;" />
                        
<Button DockPanel.Dock="Bottom"
                            
Style="{DynamicResource {x:Static igEditors:XamMonthCalendar.TodayButtonStyleKey}}"
                            
Visibility="{TemplateBinding TodayButtonVisibility}" />
                    
</ToolBar>
                    
<Grid DockPanel.Dock="Top">
                        
<Grid.ColumnDefinitions>
                            
<ColumnDefinition MaxWidth="200" />
                            
<ColumnDefinition />
                            
<ColumnDefinition MaxWidth="200" />
                        
</Grid.ColumnDefinitions>
                        
<Viewbox StretchDirection="DownOnly">
                            
<igEditors:CalendarItemGroup 
                                
ReferenceGroupOffset="-1" 
                                
ScrollNextButtonVisibility="Hidden"
                                
ScrollPreviousButtonVisibility="Hidden"
                                
ShowLeadingDates="{TemplateBinding ShowLeadingAndTrailingDates}"
                                
ShowTrailingDates="False"
                                
/>
                        
</Viewbox>
                        
<Viewbox StretchDirection="DownOnly" Grid.Column="2">
                            
<igEditors:CalendarItemGroup 
                                
ReferenceGroupOffset="1" 
                                
ScrollNextButtonVisibility="Hidden"
                                
ScrollPreviousButtonVisibility="Hidden"
                                
ShowTrailingDates="{TemplateBinding ShowLeadingAndTrailingDates}"
                                
ShowLeadingDates="False"
                                
/>
                        
</Viewbox>
                    
</Grid>
                    
<igEditors:CalendarItemGroup 
                        
HorizontalAlignment="Stretch"
                        
VerticalAlignment="Stretch"
                        
ReferenceGroupOffset="0"
                        
ShowLeadingDates="False"
                        
ShowTrailingDates="False"
                        
/>
                
</DockPanel>
            
</Border>
        
</ControlTemplate>
    
</UserControl.Resources>
    
<igEditors:XamMonthCalendar
        
x:Name="xamMonthCalendar1"
        
Template="{StaticResource PreviewNextPreviousMonths}" />
</UserControl>
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also