.NET - Are there any flip clock controls?
Asked Answered
V

4

5

For a .NET (Winforms) application are there any flip clock controls?

Ideally it would look something like the one found on the BlackBerry Bold:

alt text http://images.crackberry.com/files/u3/reviewimages/blackberry9000c/lgclock3.jpg

UPDATE 1:

Following this SO link I have added an element host to my project to host the WPF retroclock that @Shane mentioned.

UPDATE 2:

A few steps that I followed:

  • Compile RetroClock
  • Add DLL reference to WinForm App
  • Add 'using WPFControls.Clocks;'
  • Add 'elementHost' to Form
  • In Form Load event add:

    //create retroclock

    RetroClock rc = new RetroClock();

    //add retroclock to element host

    elementHost1.Child = rc;

UPDATE 3:

Styling the clock

//style clock
rc.Height = 30;
rc.IncludeLeadingZero = true;
rc.IsAmPmVisible = true;
rc.FontSize = 60;
rc.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
rc.TimeFormat = TimeFormats.Hour12;
Victualage answered 19/5, 2010 at 18:42 Comment(0)
W
4

Going along with Joel's answer, there's a simple one for WPF here.

Washstand answered 19/5, 2010 at 19:16 Comment(1)
Thanks - I have decided to try and host it in my Winform App.Victualage
P
4

That would be a little out of place for winforms, the main point of which is to expose the common controls to .Net to help developers build windows applications that use the "standard" look and feel. This doesn't mean you won't find one, but that you should think 3rd party first here. Anything provided by Microsoft is going to be at best an afterthought.

WPF, on the other hand, is a much better fit for this kind of thing.

Privett answered 19/5, 2010 at 18:47 Comment(0)
W
4

Going along with Joel's answer, there's a simple one for WPF here.

Washstand answered 19/5, 2010 at 19:16 Comment(1)
Thanks - I have decided to try and host it in my Winform App.Victualage
W
3

It's pretty easy to make one yourself. Add a class, derive it from Control. You'll need a Timer that keeps it going, have its Tick method call Invalidate(). Override OnPaint() to draw the digits and am/pm indicator. You'll want the TextRenderer.DrawText() overload that draws inside a rectangle to get the digits centered. Draw a black line through the center.

Ought to be fun.

Wizardly answered 19/5, 2010 at 19:58 Comment(1)
Fun until the boss asks why you are building a clock... : )Victualage
S
1

There is a free UIElement HandyControl by Mahdi Hosseini https://marketplace.visualstudio.com/items?itemName=MahdiHosseini.HandyControls

I hope it help.

Solemn answered 1/3, 2023 at 13:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.