Intersoft ClientUI 8 > ClientUI Controls > Control Library > Scheduling Controls Overview > UXScheduleView > UXScheduleView How-to Topics > How-to: Customize the Editing Form in UXScheduleView |
This example shows how to customize the editing form in UXScheduleView.
UXScheduleView provides a built-in editing form to edit an event in details. In some cases, you might want to add or remove some fields from the editing form. You can achieve this task by customizing the EventDetailStyle property.
The following code shows how to customize the editing form by inserting several fields in the editing form.
XAML |
Copy Code
|
---|---|
<Intersoft:UXPage.Resources> <Intersoft:ColorConverter x:Key="ColorConverter"/> <Intersoft:NullVisibilityConverter x:Key="NullVisibilityConverter"/> <Intersoft:EventDateRangeConverter x:Key="EventDateRangeConverter"/> <Intersoft:VisibilityConverter x:Key="VisibilityConverter"/> <Intersoft:UXScheduleViewResource x:Key="ScheduleViewResource"/> <LinearGradientBrush x:Key="CallOutButton_Glass" EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="#B2FFFFFF" Offset="0"/> <GradientStop Color="Transparent" Offset="1"/> <GradientStop Color="#99EFEFEF" Offset="0.5"/> <GradientStop Color="#4CF8F8F8" Offset="0.51"/> </LinearGradientBrush> <Style x:Key="CallOutButtonStyle" TargetType="Intersoft:UXButton"> <Setter Property="MinWidth" Value="70"/> <Setter Property="CornerRadius" Value="2"/> <Setter Property="BorderBrush" Value="#FFC1C1C1"/> <Setter Property="InnerBorderVisibility" Value="Collapsed"/> <Setter Property="GlassMargin" Value="0"/> <Setter Property="HorizontalContentAlignment" Value="Center"/> <Setter Property="GlassBackground" Value="{StaticResource CallOutButton_Glass}"/> <Setter Property="EnableFocusAnimation" Value="False"/> </Style> <SolidColorBrush x:Key="InputBorder" Color="#FFBEBEBE"/> <SolidColorBrush x:Key="SeparatorBorder" Color="#FFD4D4D4"/> <Style x:Key="SeparatorStyle" TargetType="Intersoft:UXSeparator"> <Setter Property="Background" Value="{StaticResource SeparatorBorder}"/> <Setter Property="Margin" Value="0,4"/> </Style> <Style x:Key="ToggleButtonStyle" BasedOn="{StaticResource CallOutButtonStyle}" TargetType="Intersoft:UXButton"> <Setter Property="MinWidth" Value="50"/> <Setter Property="Background" Value="#FFEEEEEE"/> <Setter Property="CornerRadius" Value="0"/> <Setter Property="BorderThickness" Value="0,1,1,1"/> </Style> <SolidColorBrush x:Key="LabelForeground" Color="#FF565656"/> <Style x:Key="HeaderLabelStyle" TargetType="Intersoft:FieldLabel"> <Setter Property="HeaderWidth" Value="90"/> <Setter Property="HorizontalHeaderAlignment" Value="Left"/> <Setter Property="HorizontalContentAlignment" Value="Stretch"/> <Setter Property="VerticalHeaderAlignment" Value="Center"/> <Setter Property="Padding" Value="4,2"/> <Setter Property="HeaderMargin" Value="0,0,6,0"/> <Setter Property="HeaderForeground" Value="{StaticResource LabelForeground}"/> </Style> <LinearGradientBrush x:Key="Tab_InactiveBackground" EndPoint="0,1" StartPoint="0,0"> <GradientStop Color="#FFE3E3E3"/> <GradientStop Color="#FFD0D0D0" Offset="1"/> </LinearGradientBrush> <SolidColorBrush x:Key="Tab_Border" Color="#FF9B9B9B"/> <LinearGradientBrush x:Key="Tab_GlassBackground" EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="#E5FFFFFF" Offset="0"/> <GradientStop Color="#CCFFFFFF" Offset="0.4"/> <GradientStop Color="#4CF8F8F8" Offset="0.41"/> <GradientStop Color="Transparent" Offset="1"/> </LinearGradientBrush> <SolidColorBrush x:Key="Tab_InnerBorder" Color="#BFFFFFFF"/> <SolidColorBrush x:Key="Tab_DisabledBackground" Color="#FFFFFFFF"/> <SolidColorBrush x:Key="Tab_KeyboardFocusBorder" Color="#FF747474"/> <Style x:Key="Editing_TabItemStyle" TargetType="Intersoft:UXTabItem"> <Setter Property="HorizontalContentAlignment" Value="Stretch"/> <Setter Property="VerticalContentAlignment" Value="Stretch"/> <Setter Property="Padding" Value="8,4,8,2"/> <Setter Property="Background" Value="{StaticResource Tab_InactiveBackground}"/> <Setter Property="BorderBrush" Value="{StaticResource Tab_Border}"/> <Setter Property="BorderThickness" Value="1"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="Intersoft:UXTabItem"> <Grid Background="Transparent"> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="CommonStates"> <VisualStateGroup.Transitions> <VisualTransition GeneratedDuration="0"/> <VisualTransition GeneratedDuration="0:0:0.1" To="MouseOver"/> </VisualStateGroup.Transitions> <VisualState x:Name="Normal"/> <VisualState x:Name="MouseOver"> <Storyboard> <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="AnimationElement"/> </Storyboard> </VisualState> <VisualState x:Name="Disabled"> <Storyboard> <DoubleAnimation Duration="0" To=".5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="DisabledVisualElement"/> </Storyboard> </VisualState> </VisualStateGroup> <VisualStateGroup x:Name="SelectionStates"> <VisualState x:Name="Unselected"> <Storyboard> <ColorAnimation Duration="0" To="White" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="InactiveBorder"/> <DoubleAnimation Duration="0" To="0.678" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Offset)" Storyboard.TargetName="InactiveBorder"/> </Storyboard> </VisualState> <VisualState x:Name="Selected"> <Storyboard> <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="InactiveBorder"/> <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ActiveBorder"/> </Storyboard> </VisualState> </VisualStateGroup> <VisualStateGroup x:Name="TabStripPlacementStates"> <VisualState x:Name="Top"/> <VisualState x:Name="Left"/> <VisualState x:Name="Right"/> <VisualState x:Name="Bottom"/> </VisualStateGroup> <VisualStateGroup x:Name="SelectionTabPlacementStates"> <VisualState x:Name="SelectedDefault"/> <VisualState x:Name="SelectedTop"/> <VisualState x:Name="SelectedLeft"/> <VisualState x:Name="SelectedRight"/> <VisualState x:Name="SelectedBottom"/> </VisualStateGroup> <VisualStateGroup x:Name="FocusStates"> <VisualState x:Name="Focused"/> <VisualState x:Name="Unfocused"/> </VisualStateGroup> <VisualStateGroup x:Name="KeyboardFocusStates"> <VisualState x:Name="KeyboardUnfocused"/> <VisualState x:Name="KeyboardFocused"> <Storyboard> <ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="KeyboardFocus"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Visible</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <Grid x:Name="OuterHeader" Margin="0,0,0,-11"> <Border x:Name="InactiveBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}"> <Border.Background> <LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> <GradientStop Color="#FFE3E3E3"/> <GradientStop Color="#FFD0D0D0" Offset="1"/> </LinearGradientBrush> </Border.Background> </Border> <Border x:Name="AnimationElement" BorderBrush="#00000000" BorderThickness="0,1,1,1" CornerRadius="{TemplateBinding CornerRadius}" Opacity="0"> <Border.Background> <LinearGradientBrush EndPoint="0,1" Opacity="0.5" StartPoint="0,0"> <GradientStop Color="#FFB8E2F9" Offset="0"/> <GradientStop Color="#FF90D3F6" Offset="1"/> </LinearGradientBrush> </Border.Background> </Border> <Border x:Name="ActiveBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}" Opacity="0"> <Border.Background> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="#FF7ABBFD" Offset="0.556"/> <GradientStop Color="#FFC4F9FF" Offset="1"/> </LinearGradientBrush> </Border.Background> </Border> <Border x:Name="Glass" BorderThickness="{TemplateBinding BorderThickness}" Background="{StaticResource Tab_GlassBackground}" CornerRadius="{TemplateBinding CornerRadius}" Margin="0" Opacity="0.8"/> <Border x:Name="InnerBorder" BorderBrush="{StaticResource Tab_InnerBorder}" CornerRadius="{TemplateBinding CornerRadius}" Margin="1"/> <Intersoft:StylishLabel x:Name="ContentElement" BorderThickness="0" Background="{x:Null}" ContentType="{TemplateBinding HeaderDisplayMode}" ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" ImageWidth="{TemplateBinding ImageWidth}" ImageStretch="{TemplateBinding HeaderImageStretch}" ImageSource="{TemplateBinding HeaderImage}" ImageHeight="{TemplateBinding ImageHeight}" Margin="{TemplateBinding Padding}" Padding="0" TextImageRelation="{TemplateBinding TextImageRelation}"/> <Border x:Name="DisabledVisualElement" Background="{StaticResource Tab_DisabledBackground}" CornerRadius="{TemplateBinding CornerRadius}" IsHitTestVisible="false" Margin="1" Opacity="0"/> <Rectangle x:Name="KeyboardFocus" IsHitTestVisible="False" Margin="2" RadiusY="1" RadiusX="1" Stroke="{StaticResource Tab_KeyboardFocusBorder}" StrokeDashArray="1 1" Visibility="Collapsed"/> </Grid> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="Editing_TabStyle" TargetType="Intersoft:UXTabControl"> <Setter Property="ItemContainerStyle" Value="{StaticResource Editing_TabItemStyle}"/> <Setter Property="BorderBrush" Value="#FFC1C1C1"/> <Setter Property="Background"> <Setter.Value> <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="#FFF3F3F3" Offset="0"/> <GradientStop Color="#FFF6F6F6" Offset="1"/> </LinearGradientBrush> </Setter.Value> </Setter> <Setter Property="TabStripHorizontalAlignment" Value="Center"/> <Setter Property="CornerRadius" Value="4"/> <Setter Property="BorderThickness" Value="1"/> <Setter Property="Padding" Value="0,18,0,0"/> </Style> <LinearGradientBrush x:Key="CallOutBackground" EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="#F2F0F0F0"/> <GradientStop Color="#FFF2F2F2" Offset="0.112"/> <GradientStop Color="#F2F0F0F0" Offset="1"/> </LinearGradientBrush> <DropShadowEffect x:Key="CallOutEffect" BlurRadius="15" Direction="0" Opacity="0.35" ShadowDepth="1"/> <Style x:Key="EventDetailStyle" TargetType="Intersoft:UXScheduleViewEventDetail"> <Setter Property="DefaultFocus" Value="DefaultFocus"/> <Setter Property="DetailInfoTemplate"> <Setter.Value> <DataTemplate> <StackPanel Margin="8,6,8,4"> <Intersoft:DockPanel FillChildMode="Last" MaxWidth="360"> <Grid Background="White" Height="14" Margin="0,4,6,0" ToolTipService.ToolTip="{Binding Category.CategoryName}" Visibility="{Binding Category, Converter={StaticResource NullVisibilityConverter}}" VerticalAlignment="Top" Width="14"> <Border Background="{Binding Category.CategoryColor, Converter={StaticResource ColorConverter}}" Opacity="0.7"/> <Border BorderBrush="{Binding Category.CategoryColor, Converter={StaticResource ColorConverter}}" BorderThickness="1"/> </Grid> <StackPanel> <TextBlock FontSize="14.667" HorizontalAlignment="Left" Text="{Binding Subject}" ToolTipService.ToolTip="{Binding Subject}" TextTrimming="WordEllipsis" VerticalAlignment="Top"/> <StackPanel Orientation="Horizontal"> <TextBlock Foreground="#FF555555" FontSize="12" Margin="0,2,0,0" TextWrapping="Wrap" Text="{Binding Converter={StaticResource EventDateRangeConverter}}"/> <Image Margin="4,0" Opacity="0.5" Source="/Intersoft.Client.UI.ScheduleView;component/Resources/recurring.png" Height="16" Width="16" ToolTipService.ToolTip="{Binding RecurringInfo}" Visibility="{Binding IsRecurring, Converter={StaticResource VisibilityConverter}}"/> </StackPanel> <TextBlock Foreground="#FF555555" FontSize="12" HorizontalAlignment="Left" Margin="0,2,0,0" TextWrapping="Wrap" Text="{Binding Location}" VerticalAlignment="Top"/> </StackPanel> </Intersoft:DockPanel> <TextBlock Foreground="#FF727272" HorizontalAlignment="Left" MaxHeight="32" Margin="0,8,0,0" TextWrapping="Wrap" Text="{Binding Description}" TextTrimming="WordEllipsis" VerticalAlignment="Top"/> <Intersoft:UXSeparator Background="#FFD4D4D4" Margin="0,8,0,0"/> <StackPanel HorizontalAlignment="Right" Margin="0,8,0,0" Orientation="Horizontal"> <Intersoft:UXButton Content="{Binding EditText, Source={StaticResource ScheduleViewResource}}" Command="Intersoft:ScheduleViewCommands.Edit" IsDefault="True" Style="{StaticResource CallOutButtonStyle}"/> <Intersoft:UXDropDownButton Content="{Binding EditText, Source={StaticResource ScheduleViewResource}}" Command="Intersoft:ScheduleViewCommands.EditRecurrence" IsDefault="True" Style="{StaticResource CallOutButtonStyle}"> <Intersoft:UXMenuItem Command="Intersoft:ScheduleViewCommands.EditOccurrence" Header="{Binding EditOccurrenceText, Source={StaticResource ScheduleViewResource}}"/> <Intersoft:UXMenuItem Command="Intersoft:ScheduleViewCommands.EditSeries" Header="{Binding EditSeriesText, Source={StaticResource ScheduleViewResource}}"/> </Intersoft:UXDropDownButton> <Intersoft:UXButton Content="{Binding DeleteText, Source={StaticResource ScheduleViewResource}}" Command="Intersoft:ScheduleViewCommands.Delete" Margin="6,0,0,0" Style="{StaticResource CallOutButtonStyle}"/> <Intersoft:UXDropDownButton Content="{Binding DeleteText, Source={StaticResource ScheduleViewResource}}" Command="Intersoft:ScheduleViewCommands.DeleteRecurrence" Margin="6,0,0,0" Style="{StaticResource CallOutButtonStyle}"> <Intersoft:UXMenuItem Command="Intersoft:ScheduleViewCommands.DeleteOccurrence" Header="{Binding DeleteOccurrenceText, Source={StaticResource ScheduleViewResource}}"/> <Intersoft:UXMenuItem Command="Intersoft:ScheduleViewCommands.DeleteSeries" Header="{Binding DeleteSeriesText, Source={StaticResource ScheduleViewResource}}"/> </Intersoft:UXDropDownButton> </StackPanel> </StackPanel> </DataTemplate> </Setter.Value> </Setter> <Setter Property="EditingFormTemplate"> <Setter.Value> <DataTemplate> <Intersoft:DockPanel FillChildMode="Custom" Margin="4,10,4,2" MinHeight="440" Width="380"> <Intersoft:UXTabControl Intersoft:DockPanel.IsFillElement="True" Style="{StaticResource Editing_TabStyle}" SelectedIndex="{Binding ActiveIndex, Mode=TwoWay}"> <Intersoft:UXTabItem BorderThickness="1,1,0,1" CornerRadius="4,0,0,4" Header="General" MinWidth="85"> <Intersoft:UXItemsControl ItemContainerStyle="{StaticResource HeaderLabelStyle}" Padding="6"> <Intersoft:FieldLabel Header="Subject"> <Intersoft:UXTextBox x:Name="DefaultFocus" BorderBrush="{StaticResource InputBorder}" Text="{Binding CurrentItem.Subject, Mode=TwoWay, ValidatesOnDataErrors=True}"/> </Intersoft:FieldLabel> <Intersoft:FieldLabel> <Intersoft:FieldLabel.Header> <TextBlock Text="Customer" FontWeight="Bold"/> </Intersoft:FieldLabel.Header> <Intersoft:UXTextBox BorderBrush="{StaticResource InputBorder}" Text="{Binding CurrentItem.OriginalObject.Customer, Mode=TwoWay, ValidatesOnDataErrors=True}"/> </Intersoft:FieldLabel> <Intersoft:FieldLabel> <Intersoft:FieldLabel.Header> <TextBlock Text="Project" FontWeight="Bold"/> </Intersoft:FieldLabel.Header> <Intersoft:UXTextBox BorderBrush="{StaticResource InputBorder}" Text="{Binding CurrentItem.OriginalObject.ProjectName, Mode=TwoWay, ValidatesOnDataErrors=True}"/> </Intersoft:FieldLabel> <Intersoft:FieldLabel Header="Start Time"> <Intersoft:UXDateTimePicker BorderBrush="{StaticResource InputBorder}" Culture="{Binding Culture, RelativeSource={RelativeSource TemplatedParent}}" EditorMode="{Binding EditorMode}" EditMask="{Binding EditorMask}" SpinMode="GlobalValue" UseEditMaskAsDisplayMask="True" Value="{Binding CurrentItem.StartDateAction, Mode=TwoWay}" Width="180"/> </Intersoft:FieldLabel> <Intersoft:FieldLabel Header="End Time" VerticalHeaderAlignment="Top"> <StackPanel> <Intersoft:UXDateTimePicker BorderBrush="{StaticResource InputBorder}" Culture="{Binding Culture, RelativeSource={RelativeSource TemplatedParent}}" EditorMode="{Binding EditorMode}" EditMask="{Binding EditorMask}" SpinMode="GlobalValue" UseEditMaskAsDisplayMask="True" Value="{Binding CurrentItem.EndDateAction, Mode=TwoWay, ValidatesOnDataErrors=True}" Width="180"/> <Intersoft:UXCheckBox Content="All day" IsChecked="{Binding CurrentItem.AllDayEventAction, Mode=TwoWay}" Margin="0,4,0,0"/> <Intersoft:UXCheckBox IsChecked="{Binding IsRecurring, Mode=TwoWay}" Visibility="{Binding IsRecurringEvent, Converter={StaticResource VisibilityConverter}}"> <TextBlock TextWrapping="Wrap" Text="{Binding RecurringInfo}"/> </Intersoft:UXCheckBox> <TextBlock TextWrapping="Wrap" Text="{Binding RecurringInfo}" Visibility="{Binding IsEvent, Converter={StaticResource VisibilityConverter}}"/> </StackPanel> </Intersoft:FieldLabel> <Intersoft:UXSeparator Style="{StaticResource SeparatorStyle}"/> <Intersoft:FieldLabel Header="Resource"> <Intersoft:UXComboBox CornerRadius="2" ItemsSource="{Binding ResourceCollection}" SelectedValuePath="ResourceID" SelectedValue="{Binding CurrentItem.ResourceIDAction, Mode=TwoWay}"> <Intersoft:UXComboBox.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <Rectangle Fill="{Binding ResourceColor, Converter={StaticResource ColorConverter}}" Height="16" Margin="0,0,4,0" Width="16"/> <TextBlock Text="{Binding ResourceName}"/> </StackPanel> </DataTemplate> </Intersoft:UXComboBox.ItemTemplate> </Intersoft:UXComboBox> </Intersoft:FieldLabel> <Intersoft:FieldLabel Header="Category"> <Intersoft:UXComboBox CornerRadius="2" ItemsSource="{Binding CategoryCollection}" SelectedValuePath="CategoryID" SelectedValue="{Binding CurrentItem.CategoryIDAction, Mode=TwoWay}"> <Intersoft:UXComboBox.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <Rectangle Fill="{Binding CategoryColor, Converter={StaticResource ColorConverter}}" Height="16" Margin="0,0,4,0" Width="16"/> <TextBlock Text="{Binding CategoryName}"/> </StackPanel> </DataTemplate> </Intersoft:UXComboBox.ItemTemplate> </Intersoft:UXComboBox> </Intersoft:FieldLabel> <Intersoft:FieldLabel Header="Location"> <Intersoft:UXTextBox BorderBrush="{StaticResource InputBorder}" Text="{Binding CurrentItem.Location, Mode=TwoWay}"/> </Intersoft:FieldLabel> <Intersoft:UXSeparator Style="{StaticResource SeparatorStyle}"/> <Intersoft:FieldLabel Header="Importance"> <Intersoft:UXItemsControl ItemContainerStyle="{StaticResource ToggleButtonStyle}" Orientation="Horizontal"> <Intersoft:UXToggleButton BorderThickness="1" Content="Low" CornerRadius="2,0,0,2" GroupName="Importance" IsChecked="{Binding IsLowImportance, Mode=TwoWay}"/> <Intersoft:UXToggleButton BorderThickness="0,1" Content="Normal" CornerRadius="0" GroupName="Importance" IsChecked="{Binding IsNormal, Mode=TwoWay}"/> <Intersoft:UXToggleButton BorderThickness="1" Content="High" CornerRadius="0,2,2,0" GroupName="Importance" IsChecked="{Binding IsHighImportance, Mode=TwoWay}"/> </Intersoft:UXItemsControl> </Intersoft:FieldLabel> <Intersoft:FieldLabel Header="Reminder"> <Intersoft:UXComboBox CornerRadius="2" DisplayMemberPath="Name" ItemsSource="{Binding ReminderCollection}" SelectedValuePath="Value" SelectedValue="{Binding CurrentItem.Reminder, Mode=TwoWay}"/> </Intersoft:FieldLabel> <Intersoft:FieldLabel Header="Notes" VerticalHeaderAlignment="Top"> <Intersoft:UXTextBox AcceptsReturn="True" BorderBrush="{StaticResource InputBorder}" Height="74" TextWrapping="Wrap" Text="{Binding CurrentItem.Description, Mode=TwoWay}"/> </Intersoft:FieldLabel> </Intersoft:UXItemsControl> </Intersoft:UXTabItem> <Intersoft:UXTabItem BorderThickness="1" CornerRadius="0,4,4,0" Header="Recurring" IsEnabled="{Binding CanEditRecurringInfo}" MinWidth="85"> <StackPanel Margin="6"> <Intersoft:UXItemsControl ItemContainerStyle="{StaticResource HeaderLabelStyle}"> <Intersoft:FieldLabel Header="Repeat"> <Intersoft:UXItemsControl ItemContainerStyle="{StaticResource ToggleButtonStyle}" Orientation="Horizontal"> <Intersoft:UXToggleButton BorderThickness="1" Content="None" CornerRadius="2,0,0,2" GroupName="RecurringPattern" IsChecked="{Binding IsNotRecurring, Mode=TwoWay}"/> <Intersoft:UXToggleButton Content="Daily" GroupName="RecurringPattern" IsChecked="{Binding IsDailyRecurrence, Mode=TwoWay}"/> <Intersoft:UXToggleButton Content="Weekly" GroupName="RecurringPattern" IsChecked="{Binding IsWeeklyRecurrence, Mode=TwoWay}"/> <Intersoft:UXToggleButton Content="Monthly" GroupName="RecurringPattern" IsChecked="{Binding IsMonthlyRecurrence, Mode=TwoWay}"/> <Intersoft:UXToggleButton Content="Yearly" CornerRadius="0,2,2,0" GroupName="RecurringPattern" IsChecked="{Binding IsYearlyRecurrence, Mode=TwoWay}"/> </Intersoft:UXItemsControl> </Intersoft:FieldLabel> </Intersoft:UXItemsControl> <Intersoft:UXSeparator Style="{StaticResource SeparatorStyle}"/> <Intersoft:ExpandableGroupBox AllowExpandCollapse="False" HeaderLineBorder="{x:Null}" HeaderVisibility="Collapsed" IsExpanded="{Binding IsRecurring}" Padding="0"> <StackPanel> <Intersoft:UXItemsControl ItemContainerStyle="{StaticResource HeaderLabelStyle}"> <Intersoft:FieldLabel Header="Pattern" VerticalHeaderAlignment="Top"> <Grid> <Grid Visibility="{Binding IsDailyRecurrence, Converter={StaticResource VisibilityConverter}}"> <Intersoft:UXItemsControl> <Intersoft:UXRadioButton IsChecked="{Binding IsRecurOnEveryNDay, Mode=TwoWay}" VerticalContentAlignment="Center"> <StackPanel Orientation="Horizontal"> <TextBlock Text="Every " VerticalAlignment="Center"/> <Intersoft:UXNumericUpDown BorderBrush="{StaticResource InputBorder}" EditMask="N0" Maximum="999" MinWidth="36" Minimum="1" SpinnerVisibility="Collapsed" UseEditMaskAsDisplayMask="True" Value="{Binding RecurEveryNDay, Mode=TwoWay}" VerticalAlignment="Center"/> <TextBlock Text=" day(s)" VerticalAlignment="Center"/> </StackPanel> </Intersoft:UXRadioButton> <Intersoft:UXRadioButton Content="Every weekday" IsChecked="{Binding IsRecurOnEveryWeekDay, Mode=TwoWay}"/> </Intersoft:UXItemsControl> </Grid> <Grid Visibility="{Binding IsWeeklyRecurrence, Converter={StaticResource VisibilityConverter}}"> <StackPanel> <StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal"> <TextBlock Text="Recur every " VerticalAlignment="Center"/> <Intersoft:UXNumericUpDown BorderBrush="{StaticResource InputBorder}" EditMask="N0" Maximum="99" MinWidth="36" Minimum="1" SpinnerVisibility="Collapsed" UseEditMaskAsDisplayMask="True" Value="{Binding RecurEveryNWeek, Mode=TwoWay}" VerticalAlignment="Center"/> <TextBlock Text=" week(s) on : " VerticalAlignment="Center"/> </StackPanel> </StackPanel> <Intersoft:UXItemsControl Margin="0,4"> <Intersoft:UXItemsControl.ItemsPanel> <ItemsPanelTemplate> <Intersoft:WrapPanel Orientation="Horizontal"/> </ItemsPanelTemplate> </Intersoft:UXItemsControl.ItemsPanel> <Intersoft:UXCheckBox Content="{Binding Sunday}" IsChecked="{Binding RecurOnSunday, Mode=TwoWay}"/> <Intersoft:UXCheckBox Content="{Binding Monday}" IsChecked="{Binding RecurOnMonday, Mode=TwoWay}"/> <Intersoft:UXCheckBox Content="{Binding Tuesday}" IsChecked="{Binding RecurOnTuesday, Mode=TwoWay}"/> <Intersoft:UXCheckBox Content="{Binding Wednesday}" IsChecked="{Binding RecurOnWednesday, Mode=TwoWay}"/> <Intersoft:UXCheckBox Content="{Binding Thursday}" IsChecked="{Binding RecurOnThursday, Mode=TwoWay}"/> <Intersoft:UXCheckBox Content="{Binding Friday}" IsChecked="{Binding RecurOnFriday, Mode=TwoWay}"/> <Intersoft:UXCheckBox Content="{Binding Saturday}" IsChecked="{Binding RecurOnSaturday, Mode=TwoWay}"/> </Intersoft:UXItemsControl> </StackPanel> </Grid> <Grid Visibility="{Binding IsMonthlyRecurrence, Converter={StaticResource VisibilityConverter}}"> <StackPanel Orientation="Horizontal" VerticalAlignment="Top"> <TextBlock Text="Day " VerticalAlignment="Center"/> <Intersoft:UXNumericUpDown BorderBrush="{StaticResource InputBorder}" EditMask="N0" Maximum="31" MinWidth="36" Minimum="1" SpinnerVisibility="Collapsed" UseEditMaskAsDisplayMask="True" Value="{Binding RecurAtNDayMonth, Mode=TwoWay}" VerticalAlignment="Center"/> <TextBlock Text=" of every " VerticalAlignment="Center"/> <Intersoft:UXNumericUpDown BorderBrush="{StaticResource InputBorder}" EditMask="N0" Maximum="99" MinWidth="36" Minimum="1" SpinnerVisibility="Collapsed" UseEditMaskAsDisplayMask="True" Value="{Binding RecurEveryNMonth, Mode=TwoWay}" VerticalAlignment="Center"/> <TextBlock Text=" month(s)" VerticalAlignment="Center"/> </StackPanel> </Grid> <Grid Visibility="{Binding IsYearlyRecurrence, Converter={StaticResource VisibilityConverter}}"> <StackPanel> <StackPanel Orientation="Horizontal"> <TextBlock Text="Recur every " VerticalAlignment="Center"/> <Intersoft:UXNumericUpDown BorderBrush="{StaticResource InputBorder}" EditMask="N0" Maximum="99" MinWidth="36" Minimum="1" SpinnerVisibility="Collapsed" UseEditMaskAsDisplayMask="True" Value="{Binding RecurEveryNYear, Mode=TwoWay}" VerticalAlignment="Center"/> <TextBlock Text=" year(s) " VerticalAlignment="Center"/> </StackPanel> <StackPanel Margin="0,4" Orientation="Horizontal"> <TextBlock Text="On " VerticalAlignment="Center"/> <Intersoft:UXComboBox CornerRadius="2" DisplayMemberPath="Name" ItemsSource="{Binding MonthCollection}" Margin="4,0" MinWidth="128" SelectedValuePath="Value" SelectedValue="{Binding RecurAtNMonthYear, Mode=TwoWay}" VerticalAlignment="Center"/> <Intersoft:UXNumericUpDown BorderBrush="{StaticResource InputBorder}" EditMask="N0" Maximum="{Binding MaximumRecurAtNDayYear}" MinWidth="36" SpinnerVisibility="Collapsed" UseEditMaskAsDisplayMask="True" Value="{Binding RecurAtNDayYear, Mode=TwoWay}" VerticalAlignment="Center"/> </StackPanel> </StackPanel> </Grid> </Grid> </Intersoft:FieldLabel> </Intersoft:UXItemsControl> <Intersoft:UXSeparator Style="{StaticResource SeparatorStyle}"/> <Intersoft:UXItemsControl ItemContainerStyle="{StaticResource HeaderLabelStyle}"> <Intersoft:FieldLabel Header="Range Start"> <Intersoft:UXDateTimePicker BorderBrush="{StaticResource InputBorder}" EditorMode="Calendar" EditMask="MM/dd/yyyy" SpinMode="GlobalValue" UseEditMaskAsDisplayMask="True" Value="{Binding StartRecurrence, Mode=TwoWay}"/> </Intersoft:FieldLabel> <Intersoft:FieldLabel Header="Range End" VerticalHeaderAlignment="Top"> <StackPanel> <Intersoft:UXRadioButton Content="No end date" IsChecked="{Binding IsNoEndDate, Mode=TwoWay}"/> <Intersoft:UXRadioButton IsChecked="{Binding IsEndAfterRecurrences, Mode=TwoWay}"> <StackPanel Orientation="Horizontal"> <TextBlock Text="End after " VerticalAlignment="Center"/> <Intersoft:UXNumericUpDown BorderBrush="{StaticResource InputBorder}" EditMask="N0" Maximum="999" MinWidth="36" Minimum="1" SpinnerVisibility="Collapsed" UseEditMaskAsDisplayMask="True" Value="{Binding TotalRecurrences, Mode=TwoWay}" VerticalAlignment="Center"/> <TextBlock Text=" occurences" VerticalAlignment="Center"/> </StackPanel> </Intersoft:UXRadioButton> <Intersoft:UXRadioButton IsChecked="{Binding IsEndByDate, Mode=TwoWay}"> <StackPanel Orientation="Horizontal"> <TextBlock Text="End by " VerticalAlignment="Center"/> <Intersoft:UXDateTimePicker BorderBrush="{StaticResource InputBorder}" EditorMode="Calendar" EditMask="MM/dd/yyyy" SpinMode="GlobalValue" UseEditMaskAsDisplayMask="True" Value="{Binding EndRecurrence, Mode=TwoWay}" VerticalAlignment="Center"/> </StackPanel> </Intersoft:UXRadioButton> </StackPanel> </Intersoft:FieldLabel> </Intersoft:UXItemsControl> </StackPanel> </Intersoft:ExpandableGroupBox> </StackPanel> </Intersoft:UXTabItem> </Intersoft:UXTabControl> <Grid Intersoft:DockPanel.Dock="Bottom"> <StackPanel HorizontalAlignment="Right" Margin="2,8,2,2" Orientation="Horizontal"> <Intersoft:UXButton Content="Save" Command="{Binding SaveCommand}" IsDefault="True" Style="{StaticResource CallOutButtonStyle}"/> <Intersoft:UXButton Content="Cancel" Command="{Binding CancelCommand}" Margin="6,0,0,0" Style="{StaticResource CallOutButtonStyle}"/> </StackPanel> </Grid> </Intersoft:DockPanel> </DataTemplate> </Setter.Value> </Setter> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="Intersoft:UXScheduleViewEventDetail"> <Grid x:Name="RootElement"> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="CommonStates"> <VisualState x:Name="Normal"/> <VisualState x:Name="Editing"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="EditingFormContainer"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Visible</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="DetailInfoContainer"> <DiscreteObjectKeyFrame KeyTime="0"> <DiscreteObjectKeyFrame.Value> <Visibility>Collapsed</Visibility> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> <ColorAnimation Duration="0" To="#FFDDDDDD" Storyboard.TargetProperty="(Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="DetailInfo"/> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <Intersoft:UXCallOut x:Name="DetailInfo" BorderBrush="#FF9C9C9C" BoundaryOffset="20" Background="{StaticResource CallOutBackground}" CallOutEffect="{StaticResource CallOutEffect}" CornerRadius="6" DisplayAnimation="Zoom" DisableOverlay="False" EnableFadeOutAnimation="False" Foreground="#FF363636" HideAnimation="None" IsModal="True" MouseEnterAction="None" MouseLeaveAction="None" MouseClickAction="None"> <Intersoft:UXFluidContainer x:Name="FluidContainer" EnableAnimation="{Binding IsOpen, ElementName=DetailInfo}" HorizontalAlignment="Center" MaxWidth="420" MinWidth="300" VerticalAlignment="Top"> <Grid x:Name="ContentElement"> <Grid x:Name="DetailInfoContainer"/> <Grid x:Name="EditingFormContainer" Visibility="Collapsed"/> </Grid> </Intersoft:UXFluidContainer> </Intersoft:UXCallOut> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> </Intersoft:UXPage.Resources> <Intersoft:UXScheduleView DisplayDate="1/2/2012" EventsSource="{Binding Events}" CategoriesSource="{Binding Categories}" ResourcesSource="{Binding Resources}" EventDetailStyle="{StaticResource EventDetailStyle}"> <Intersoft:UXScheduleDayView/> <Intersoft:UXScheduleWorkWeekView/> <Intersoft:UXScheduleWeekView IsActive="True"/> <Intersoft:UXScheduleMonthView/> </Intersoft:UXScheduleView> |
The results look like the following illustration.