This is a migrated thread and some comments may be shown as answers.

ScheduleView and TimeBar, the minimap doesn't show the TimeRuler

0 Answers 93 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Margot
Top achievements
Rank 1
Margot asked on 20 Jan 2012, 12:31 PM
Dear Telerik support team,

I followed the ScheduleView and TimeBar Demo example, but in my case, the time ruler doesn't show up in the minimap. Please refer to the attached screenshot.

My XAML Code is :
<telerik:RadScheduleView x:Name="rdMinimapSchedule" ResourceTypesSource="{Binding ResourceTypes}" Grid.Row="0"
AppointmentsSource="{Binding MinimapAppointments}" MinAppointmentHeight="5" Grid.ColumnSpan="2"
Margin="1,50,1,40" CurrentDate="{Binding ElementName=TimeBar,Path=VisiblePeriodStart}"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" NavigationHeaderVisibility="Collapsed">
<telerik:RadScheduleView.ActiveViewDefinition>
<telerik:TimelineViewDefinition ShowTimeRuler="False" StretchAppointments="True" StretchGroupHeaders="True">
<telerik:TimelineViewDefinition.MajorTickLength>
<local:OneYearTick />
</telerik:TimelineViewDefinition.MajorTickLength>
<telerik:TimelineViewDefinition.MinorTickLength>
<local:OneYearTick />
</telerik:TimelineViewDefinition.MinorTickLength>
</telerik:TimelineViewDefinition>
</telerik:RadScheduleView.ActiveViewDefinition>
<telerik:RadScheduleView.AppointmentStyleSelector>
<local:SingleStyleSelector>
<Style TargetType="telerik:AppointmentItem">
<Setter Property="Margin" Value="1 0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="telerik:AppointmentItem">
<Grid>
<Rectangle
Fill="{Binding Category.CategoryBrush, FallbackValue=LightGray}" />
<Rectangle
Fill="{Binding TimeMarker.TimeMarkerBrush, FallbackValue=DarkGray}"
Height="2" VerticalAlignment="Bottom" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</local:SingleStyleSelector>
</telerik:RadScheduleView.AppointmentStyleSelector>
<telerik:RadScheduleView.GroupDescriptionsSource>
<telerik:GroupDescriptionCollection>
<telerik:ResourceGroupDescription ResourceType="Countries" />
<telerik:DateGroupDescription ></telerik:DateGroupDescription>
</telerik:GroupDescriptionCollection>
</telerik:RadScheduleView.GroupDescriptionsSource>
<telerik:RadScheduleView.GroupHeaderStyleSelector>
<local:SingleStyleSelector>
<Style TargetType="telerik:GroupHeader">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="telerik:GroupHeader">
<Rectangle />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</local:SingleStyleSelector>
</telerik:RadScheduleView.GroupHeaderStyleSelector>
</telerik:RadScheduleView>
<telerik:RadTimeBar x:Name="TimeBar" Margin="2" Grid.ColumnSpan="2" Grid.Row="0"
telerik:StyleManager.Theme="Metro" Background="Transparent" MinSelectionRange="1.00:00:00" MaxSelectionRange="31.00:00:00"
MinZoomRange="31.00:00:00" IsSnapToIntervalEnabled="True"
VisiblePeriodChanged="TimeBar_VisiblePeriodChanged">
<telerik:RadTimeBar.Intervals>
<telerik:YearInterval />
<telerik:MonthInterval />
<telerik:WeekInterval />
<telerik:DayInterval />
</telerik:RadTimeBar.Intervals>
</telerik:RadTimeBar>

In the code behind I defined the period and the visualperiod of TimeBar :
TimeBar.PeriodStart = DateTime.Now.AddMonths(-6);
TimeBar.PeriodEnd = DateTime.Now.AddMonths(6);
TimeBar.VisiblePeriodStart = DateTime.Now.AddMonths(-1);
TimeBar.VisiblePeriodEnd = DateTime.Now.AddMonths(1);
TimeBar.SelectionStart = DateTime.Now.AddDays(-7);
TimeBar.SelectionEnd = DateTime.Now.AddDays(7);
UpdateMinimap();

Please take a look into it and tell me what's wrong with my code.
Thanks a lot


No answers yet. Maybe you can help?

Tags
ScheduleView
Asked by
Margot
Top achievements
Rank 1
Share this question
or