This question is locked. New answers and comments are not allowed.
Hi All,
I have a weird situation here. I have Create and Delete Appointment buttons, but they are not enabled. Even if I highlight a number of hours, the "Create" button does not enabled. It's not until after I click on existing appt, that the Create and Delete buttons are enabled.
Here is some stripped down xaml that demonstrates the problem. What am I missing?
Thanks!
I have a weird situation here. I have Create and Delete Appointment buttons, but they are not enabled. Even if I highlight a number of hours, the "Create" button does not enabled. It's not until after I click on existing appt, that the Create and Delete buttons are enabled.
Here is some stripped down xaml that demonstrates the problem. What am I missing?
Thanks!
<
UserControl
x:Class
=
"BLScheduler.CD2"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
xmlns:scheduleView
=
"clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.ScheduleView"
xmlns:local
=
"clr-namespace:BLScheduler"
xmlns:vsm
=
"clr-namespace:System.Windows;assembly=System.Windows"
xmlns:dragDrop
=
"clr-namespace:Telerik.Windows.DragDrop;assembly=Telerik.Windows.Controls"
xmlns:telerikPrimitives
=
"clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
xmlns:telerikQuickStart
=
"clr-namespace:Telerik.Windows.Controls.QuickStart;assembly=Telerik.Windows.Controls"
mc:Ignorable
=
"d"
Loaded
=
"UserControl_Loaded"
>
<
UserControl.Resources
>
<
local:ViewModel
x:Key
=
"ViewModel"
AppointmentsSource
=
"/BLScheduler;component/Appointments.xaml"
/>
<!-- venues -->
<
SolidColorBrush
x:Key
=
"YellowCategoryBrush"
Color
=
"#FFF0C600"
/>
<
SolidColorBrush
x:Key
=
"GreenCategoryBrush"
Color
=
"#FFA3C734"
/>
<
SolidColorBrush
x:Key
=
"PurpleCategoryBrush"
Color
=
"#FF9774B4"
/>
<
SolidColorBrush
x:Key
=
"PinkCategoryBrush"
Color
=
"#FFD6798D"
/>
</
UserControl.Resources
>
<
Grid
x:Name
=
"LayoutRoot"
Background
=
"White"
DataContext
=
"{StaticResource ViewModel}"
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"50"
/>
<
RowDefinition
Height
=
"298*"
/>
</
Grid.RowDefinitions
>
<
telerik:RadScheduleView
x:Name
=
"scheduleview"
Grid.Row
=
"2"
Margin
=
"0"
SelectedAppointment
=
"{Binding SelectedAppointment, Mode=TwoWay}"
AppointmentsSource
=
"{Binding Appointments}"
ActiveViewDefinitionIndex
=
"{Binding ActiveViewDefinitionIndex,Mode=TwoWay}"
CurrentDate
=
"{Binding CurrentDate,Mode=TwoWay}"
GroupDescriptionsSource
=
"{Binding GroupDescriptions}"
NavigationHeaderVisibility
=
"Visible"
BorderThickness
=
"0 1 1 1"
FirstVisibleTime
=
"07:00"
>
<
telerik:RadScheduleView.ViewDefinitions
>
<
telerik:DayViewDefinition
GroupFilter
=
"{Binding GroupFilter}"
Title
=
"Daily"
DayStartTime
=
"07:00:00"
/>
<
telerik:WeekViewDefinition
GroupFilter
=
"{Binding GroupFilter}"
Title
=
"Weekly"
FirstDayOfWeek
=
"Monday"
DayStartTime
=
"07:00:00"
/>
<
telerik:WeekViewDefinition
GroupFilter
=
"{Binding GroupFilter}"
Title
=
"Weekends"
FirstDayOfWeek
=
"Saturday"
VisibleDays
=
"2"
DayStartTime
=
"07:00:00"
/>
<
local:WorkWeekViewDefinition
GroupFilter
=
"{Binding GroupFilter}"
Title
=
"Work Days"
FirstDayOfWeek
=
"Monday"
DayStartTime
=
"07:00:00"
/>
<
telerik:MonthViewDefinition
GroupFilter
=
"{Binding GroupFilter}"
Title
=
"Monthly"
DayStartTime
=
"07:00:00"
/>
</
telerik:RadScheduleView.ViewDefinitions
>
<
telerik:RadScheduleView.CategoriesSource
>
<
scheduleView:CategoryCollection
>
<
scheduleView:Category
CategoryName
=
"Yellow"
CategoryBrush
=
"{StaticResource YellowCategoryBrush}"
/>
<
scheduleView:Category
CategoryName
=
"Green"
CategoryBrush
=
"{StaticResource GreenCategoryBrush}"
/>
<
scheduleView:Category
CategoryName
=
"Purple"
CategoryBrush
=
"{StaticResource PurpleCategoryBrush}"
/>
<
scheduleView:Category
CategoryName
=
"Pink"
CategoryBrush
=
"{StaticResource PinkCategoryBrush}"
/>
</
scheduleView:CategoryCollection
>
</
telerik:RadScheduleView.CategoriesSource
>
</
telerik:RadScheduleView
>
<!-- Manage Event buttons -->
<
StackPanel
Grid.Row
=
"0"
Orientation
=
"Horizontal"
HorizontalAlignment
=
"Left"
Margin
=
"5"
Height
=
"30"
>
<
telerik:RadButton
Height
=
"Auto"
VerticalAlignment
=
"Center"
Name
=
"radButtonNewAppointment"
Width
=
"Auto"
Margin
=
"10 0"
Content
=
"Create"
Command
=
"scheduleView:RadScheduleViewCommands.CreateAppointment"
CommandTarget
=
"{Binding ElementName=scheduleview}"
>
</
telerik:RadButton
>
<
telerik:RadButton
Name
=
"radButton1"
VerticalAlignment
=
"Center"
Width
=
"Auto"
Command
=
"scheduleView:RadScheduleViewCommands.DeleteAppointment"
CommandTarget
=
"{Binding ElementName=scheduleview}"
Margin
=
"10 0"
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
Image
Source
=
"/BLScheduler;component/Images/RibbonIcons/delete_appointment.png"
Margin
=
"2"
></
Image
>
<
TextBlock
VerticalAlignment
=
"Center"
Margin
=
"2"
>Delete Appointment</
TextBlock
>
</
StackPanel
>
</
telerik:RadButton
>
</
StackPanel
>
</
Grid
>
</
UserControl
>