バージョン

HorizontalContentAlignment プロパティ

要素内の項目の方向の配置を取得または設定します。
シンタックス
'宣言
 
Public Property HorizontalContentAlignment As HorizontalAlignment
public HorizontalAlignment HorizontalContentAlignment {get; set;}
使用例
<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 TargetType="{x:Type igEditors:XamMonthCalendar}" x:Key="customCalendarTemplate">
            
<Border BorderBrush="{TemplateBinding Border.BorderBrush}" 
                  
BorderThickness="{TemplateBinding Border.BorderThickness}" 
                  
Background="{TemplateBinding Panel.Background}" 
                  
SnapsToDevicePixels="True" 
                  
Padding="{TemplateBinding Padding}">
                
<DockPanel SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                    
<!-- Today button -->
                    
<Button DockPanel.Dock="Bottom"
                        
Style="{DynamicResource {x:Static igEditors:XamMonthCalendar.TodayButtonStyleKey}}"  
                        
Visibility="{TemplateBinding TodayButtonVisibility}" />

                    
<!-- Groups -->
                    
<igEditors:CalendarItemGroupPanel 
                        
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" 
                        
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" 
                        
MaxGroups="6"
                        
GroupWidth="300"
                        
GroupHeight="300"
                        
/>
                
</DockPanel>
            
</Border>
        
</ControlTemplate>
    
</UserControl.Resources>
    
<igEditors:XamMonthCalendar
        
x:Name="xamMonthCalendar1"
        
Template="{StaticResource customCalendarTemplate}" />
</UserControl>
参照