
Creating Timeline in WPF
Since Blend is still deaf, I am doing standard things that are of no interest to anyone, then I will tell you how I am doing the Log Journal for the administrator.
Of course, it would be possible to make a standard grid and then display this on a table, but I want something unusual and at the same time convenient. Therefore, for myself, I chose the principle of timeline.
To get started, here are the links:
Silverlight & WPF Timeline Control - An excellent control that I began to use (I do not like bicycles)
Source Code - assembly sources and examples of working with it, or download library releases for Library for WPF and Library for Silverlight separately
The point is simple: we throw the DLL into the references, add new elements to our ToolBox and throw it on the form. Here is the code I got:
And of course the picture.

All this is dynamic and works. Well, almost everything - the deploy button in WPF does not work, because in libraries it is registered only for SIlverlight.
But with the addition of data, I don’t understand something, maybe one of you will understand. In the examples, data is inserted either from the server (for example: localhost : 123 / data.xml) or from resources (which for some reason does not plow).
You can also unload from the SQL database. Now it’s very late tomorrow I will update and show how to connect the database, but in a nutshell - convert to XMLDocument.
Of course, it would be possible to make a standard grid and then display this on a table, but I want something unusual and at the same time convenient. Therefore, for myself, I chose the principle of timeline.
To get started, here are the links:
Silverlight & WPF Timeline Control - An excellent control that I began to use (I do not like bicycles)
Source Code - assembly sources and examples of working with it, or download library releases for Library for WPF and Library for Silverlight separately
The point is simple: we throw the DLL into the references, add new elements to our ToolBox and throw it on the form. Here is the code I got:
- x:Name="LayoutRoot"
- Background="White">
-
-
- x:Name="tiTimeLine"
- Header="TimeLine">
-
- x:Name="grdTimeLine">
-
-
- Height="*" />
-
- Height="30" />
-
-
-
- x:Name="timeline"
- Grid.Row="0"
- CalendarType="gregorian"
- HorizontalAlignment="Stretch"
- MinDateTime="01/01/2010"
- MaxDateTime="01/01/2020"
- InitialDateTime="02/11/2010">
-
-
-
- Height="20" />
-
- Height="*" />
-
- Height="25" />
-
- Height="20" />
-
-
-
- Grid.Row="0"
- />
-
-
- Grid.Row="1"
- IsMainBand="True"
- ItemSourceType="Days"
- HorizontalAlignment="Stretch"
- TimelineWindowSize="20"
- MaxEventHeight="130" />
-
-
- Grid.Row="2"
- HorizontalAlignment="Stretch"
- ItemSourceType="months"
- TimelineWindowSize="16"
- MaxEventHeight="4" />
-
-
- Grid.Row="3"
- HorizontalAlignment="Stretch"
- ItemSourceType="years"
- TimelineWindowSize="16"
- MaxEventHeight="4" />
-
-
-
-
-
- x:Name="tiOther"
- Header="Another">
-
-
-
-
* This source code was highlighted with Source Code Highlighter.
And of course the picture.

All this is dynamic and works. Well, almost everything - the deploy button in WPF does not work, because in libraries it is registered only for SIlverlight.
But with the addition of data, I don’t understand something, maybe one of you will understand. In the examples, data is inserted either from the server (for example: localhost : 123 / data.xml) or from resources (which for some reason does not plow).
You can also unload from the SQL database. Now it’s very late tomorrow I will update and show how to connect the database, but in a nutshell - convert to XMLDocument.