I am completely new to RadTimeline and WPF in general. I'm having problems on with binding data, I was following instructions to the point from here https://docs.telerik.com/devtools/wpf/controls/radtimeline/populating-with-data/databinding and still cannot get to see object on timeline.
Basically, I have an Appointment object, which has Period field. Period has startDate and endDate, which are DateTime object. The goal is to display appointments exactly like on picture from link.
So in my ScheduleView window, I have (I'll just write key things):
this.DataContext = new TestObject(); //this is like your's Product object
TestObject has and filed Data (with property of course) which is List<Item>, named just as in your example.
In constructor of TestObject this happens:
public TestObject(List<Appointment> appointments) {
List<Item> li = new List<Item>();
foreach(Appointment ap in appointments)
{
li.Add(new Item(ap.Period.Start.Subtract(ap.Period.End), ap.Period.Start));
}
this.data = li;
}
Item object has 2 fields:
private TimeSpan timeSpan;
private DateTime startDate;
Finally here is XAML:
<Grid>
<telerik:RadTimeline x:Name="telerikTimeline" Content="RadTimeline"
HorizontalAlignment="Left" Height="333" Margin="45,53,0,0" VerticalAlignment="Top" Width="689"
PeriodStart="05/01/2019 00:00:00"
PeriodEnd="05/28/2019 00:00:00"
StartPath="StartDate"
DurationPath="TimeSpan"
ItemsSource="{Binding Data}">
<telerik:RadTimeline.Intervals>
<telerik:WeekInterval />
<telerik:DayInterval />
</telerik:RadTimeline.Intervals>
</telerik:RadTimeline>
</Grid>
What am I missing ?? So frustrating.. :)
Hi,
Although documentation and another thread here mean, it can zoom in to hours and minutes, I cant make it work... Here is my code:
<
telerik:RadTimeline
PeriodStart
=
"{Binding MinViewDate, Mode=TwoWay}"
PeriodEnd
=
"{Binding MaxViewDate, Mode=TwoWay}"
StartPath
=
"LastUpdate"
ItemsSource
=
"{Binding Activities}"
>
<
telerik:RadTimeline.Intervals
>
<
telerik:DayInterval
/>
<
telerik:HourInterval
/>
<
telerik:MinuteInterval
/>
</
telerik:RadTimeline.Intervals
>
</
telerik:RadTimeline
>
Max. zoom level is day - see "view.png". Can you explain me, what I am doing wrong?
This is the DataVizualization.dll version I am using: 2012.1.326.1050
Oleg
Hello,
I am investigating the Timeline control to determine if we are able to use it for our project.
The first problem I am getting stuck on is I can't find a way to hide the period control.
I am playing with a simple example.
http://joxi.ru/GrqyRELhQVpbGr
There is a form that shows a period information that I don't need to have.
I am trying to use styles to hide it.
<Style TargetType="telerik:TimelineGroupPeriodControl" >
<Setter Property="Height" Value="0" />
<Setter Property="Visibility" Value="Collapsed" />
</Style>
<Style TargetType="telerik:TimelinePeriodControl" >
<Setter Property="Height" Value="0" />
<Setter Property="Visibility" Value="Collapsed" />
</Style>
http://joxi.ru/VrwMkLqtObZgY2
The period control is hidden but the place is still occupied.
Is that any solution that would work for me?
Thanks
Hi,
How can I bind a Dictionary object to a Timeline.
For example:
MyMainClass with the Attribute Dictionary
Dictionary <string,MycustomObject> myObject = new Dictionary <string,MycustomObject>();
MycustomObject
Dictionary<int,AnotherObject> myOtherDictionary = new Dictionary<int,ANotherObject> ();
Date StartDate
Date EndDate
Class AnotherObject
Date DateItem
int DurationItem
I tried to asign to the ItemSource the dictionary in this way but it doesn't work
ItemSource="{Binding Path=myObject}"
StartDate="{Binding StartDate}"
DurationPath=DurationItem
Thanx's in advance