Pawan
Pawan

Reputation: 1654

Creating a WPF timeline control to integrate it in winform application

Sorry if this question sounds stupid but i am a beginner in practical programming, wpf, c# and .net stuff.

I want to create a wpf timeline control so that it can be integrated in a winform application.

It should be something like this

enter image description here

I have a database which store the Analytics events having their 'camera ID', 'event ID', date of event in 'mm/dd/yyyy' format , Time of event in 'hh/mm/ss' format and its 'description'.

now i want place this events for present year in specific camera panel based on their camera Id and time and date. the user should be able to zoom in further from months view state to day state and further upto minutes state and the events should be placed accordingly. And the user should also be able to go back to previous state by clicking a back button.

events should appear as circles depending on the number i.e density of events that took place on a particular time or date. and if a user clicks on the event he should be able to go to the specific time in recorded video when the event took place.

Now my questions are

1) Is using WPF to create such control alright or should i use winforms. As i need this control to integrate in winform application.

2) How do i go in designing and programming such control. I mean can someone provide a class diagram or flow chart for this. How do i place the events in correct positions.

3) how do i get the data stored in the database in this control as it is being read and written from the winform application.

4) And if possible can someone tell me what contols and logic should i use for the particular parts of this control.

Upvotes: 0

Views: 1425

Answers (1)

Nick Prozee
Nick Prozee

Reputation: 2913

1) Is using WPF to create such control alright or should i use winforms. As i need this control to integrate in winform application.

You should use WPF since visual elements are better to modify in WPF, the downside is that you must be familiar with XAML, Dont worry, Visual studio has a nice and easy visual editor for Objects also.

2) How do i go in designing and programming such control. I mean can someone provide a class diagram or flow chart for this. How do i place the events in correct positions.

A DataGrid seems appropriate. You should go very Object Oriented here, Here is my old post wich provides a easy and Object oriented way (Recommened). Link: Managing Datagrid

3) how do i get the data stored in the database in this control as it is being read and written from the winform application.

You should go very Object Oriented here also.Link: Object Oriented Programming. How you fill it depends on your DataSource Type.

4) And if possible can someone tell me what contols and logic should i use for the particular parts of this control.

Sorry but this website is not for someone else to write your code, you should focus on your object orientation, the Logic will follow.

Good Luck!

Upvotes: 1

Related Questions