зеркало из https://github.com/telerik/xaml-sdk.git
54 строки
1.9 KiB
XML
54 строки
1.9 KiB
XML
<Window x:Class="AnnotationsMargin.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="clr-namespace:AnnotationsMargin"
|
|
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
|
|
Title="MainWindow"
|
|
Height="500"
|
|
Width="800">
|
|
<Window.DataContext>
|
|
<local:RadTimelineAnnotationsViewModel />
|
|
</Window.DataContext>
|
|
|
|
<Window.Resources>
|
|
<DataTemplate x:Key="TimelineAnnotationTemplate">
|
|
<Border Background="#FF25A0DA">
|
|
<TextBlock Text="{Binding}" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="5" />
|
|
</Border>
|
|
</DataTemplate>
|
|
</Window.Resources>
|
|
|
|
<Grid>
|
|
<telerik:RadTimeline PeriodStart="2011-01-01"
|
|
PeriodEnd="2012-01-01"
|
|
VisiblePeriodStart="2011-01-01"
|
|
VisiblePeriodEnd="2011-02-01"
|
|
StartPath="StartDate"
|
|
DurationPath="Duration"
|
|
ItemsSource="{Binding TimelineItems}">
|
|
<telerik:RadTimeline.Intervals>
|
|
<telerik:YearInterval />
|
|
<telerik:MonthInterval />
|
|
<telerik:WeekInterval />
|
|
<telerik:DayInterval />
|
|
</telerik:RadTimeline.Intervals>
|
|
<telerik:RadTimeline.Annotations>
|
|
<telerik:TimelineAnnotation StartDate="2011-01-05"
|
|
Duration="5.00:00:00"
|
|
Margin="0,48,0,0"
|
|
ContentTemplate="{StaticResource TimelineAnnotationTemplate}" />
|
|
<telerik:TimelineAnnotation StartDate="2011-01-15"
|
|
Duration="5.00:00:00"
|
|
Margin="0,-15,0,0"
|
|
Canvas.ZIndex="150"
|
|
ContentTemplate="{StaticResource TimelineAnnotationTemplate}" />
|
|
<telerik:TimelineAnnotation StartDate="2011-01-25"
|
|
Duration="5.00:00:00"
|
|
Margin="0"
|
|
Canvas.ZIndex="50"
|
|
ContentTemplate="{StaticResource TimelineAnnotationTemplate}" />
|
|
</telerik:RadTimeline.Annotations>
|
|
</telerik:RadTimeline>
|
|
</Grid>
|
|
</Window>
|