Version

MinCalendarMode Property

Returns or sets an enumeration that indicates the minimum calendar item type that can be selected within the control.
Syntax
'Declaration
 
Public Property MinCalendarMode As CalendarMode
public CalendarMode MinCalendarMode {get; set;}
Remarks

The XamMonthCalendar provides the ability to zoom out to see larger ranges of dates and then zoom back in to change the selection similar to the functionality found in the Microsoft Vista Common Controls MonthCalendar. While the CurrentCalendarMode controls the current mode that the contained CalendarItemGroup instances use to display its items, the MinCalendarMode determines the minimum mode into which the control may zoom. For example, when set the Months, the control will not be able to zoom in any further to allow selection/viewing of individual dates/days.

When the CurrentCalendarMode is set to the same value as the MinCalendarMode, interacting within the items (e.g. via the keyboard and mouse) will affect the current SelectedDate and SelectedDates. When the CurrentCalendarMode is higher than the MinCalendarMode (i.e. the user has zoomed out), the selection will not be changed via the ui. Instead, the keyboard and mouse will be used to navigate the calendar without affecting the current selection. When the user then zooms in to the MinCalendarMode, they may then modify the selection.

The MonthCalendarCommands class defines two commands (MonthCalendarCommands.ZoomOutCalendarMode and MonthCalendarCommands.ZoomInCalendarMode) that may be used to change the CurrentCalendarMode.

Note: The value for this property will restrict the available values for the CurrentCalendarMode.

Example
The following sample demonstrates how to initialize the MinCalendarMode to control the smallest calendar date range that the end user can navigate to. It also utilizes some of the available commands for controlling the CurrentCalendarMode.

<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">
    
<DockPanel>
        
<ToolBar DockPanel.Dock="Top">
            
<Button Command="{x:Static igEditors:MonthCalendarCommands.ZoomOutCalendarMode}"
                    
CommandTarget="{Binding ElementName=xamMonthCalendar1}"
                    
Content="Zoom Out" />
            
<Button Command="{x:Static igEditors:MonthCalendarCommands.ZoomInCalendarMode}"
                    
CommandTarget="{Binding ElementName=xamMonthCalendar1}"
                    
Content="Zoom In" />
        
</ToolBar>
        
<igEditors:XamMonthCalendar
            
x:Name="xamMonthCalendar1"
            
MinCalendarMode="Months" 
            
CurrentCalendarMode="Years" />
    
</DockPanel>
</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