Create a usercontrol in C# for winforms desktop application.
.NET: 6.2.1 or earlier
Just like VS built-in trackbar, we have a need for a usercontrol that a user will drag and release a slider to set a FROM date and a TO date within this trackbar.
The trackbar shall have two sliders. One on the left shall set a FROM date and one on the right shall set TO date. Date range (minDate, MaxDate) shall be set in the visual studio design time, but also be able to set programmatically. ValueFrom and ValueTO shall return Dates of the position of these two sliders, yet they also can be set programatically.
When moving the sliders, the FROM slider shall never be able to go past the TO slider, and the TO slider shall never be able to go before the FROM slider. In other words, FROM date cannot be in the future of the TO date.
The step size shall be also defined in 'days'. For example if set to 1, moving the sliders would move dates by 1 day. The minimum shall be day. The resolultion of the track bar shall be 1 day. We will never need to pick a date or time range less than 1 day.
The visual ticks shall have a property TickStepSmall and a TickStepLarge. For example small one can be DAYS, and large MONTHS, or small MONTHS and large YEARS. Those are the only options. Defined in the properties. There shall also be labels for large and small ticks. Fonts for these shall be set in the properties - TickLabelSmallFont and TickLabelLargeFont. There shall be a property whether labels for small and large ticks are visible TickLabelSmallVisible and TickLabelLargeVisible. Obviously, there may not be enough space to show labels for small ticks, but we do not expect the usercontrol to figure that out. Just a boolean in propeties. Labels for years shall be a 4 digit number e.g. 2015. Labels for months, if for large ticks, shall be a full name such as January, but for small tickes shall be one letter - the firt letter of the month e.g. J for January but also June and July. Labels for days (only for small ticks) shall be a 1 or 2 digit number for example 25 for January 25.
The background color of the trackbar shall be as defined by the usercontorl background color. However the background color of the range selected shall be defined by RangeBackgroundColor property.
The usual events shall be accessible. Such as OnValueChange, being triggered whenever a value (either FROM or TO) has been changed.
19 freelancers are bidding on average $171 for this job
Hi there, I read your initial requirements and I have some questions regarding your project. please send me a message so that we could discuss it further.
I am software developer having 8 year of experience windows application development using c# and Wpf.I can work 4 hours a day.I can complete this project in 15 [login to view URL] ping to discuss more.