.NET Are there any flip clock controls?

Is there any flip clock for the .NET application (Winforms)?

Ideally, it would look like on the BlackBerry Bold:

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

UPDATE 1:

Following this link, https://stackoverflow.com/a/165442/1/ I added an element node to my project to host the WPF retrospective project that @Shane mentioned.

UPDATE 2:

A few steps that I followed:

  • Compile RetroClock
  • Add a link to the DLL for the WinForm application.
  • Add 'using WPFControls.Clocks;'
  • Add 'elementHost' to the form
  • In the Form Load add event:

    //create retroclock

    RetroClock rc = new RetroClock();

    //add retroclock to element host

    elementHost1.Child = rc;

UPDATE 3:

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; 
+4
source share
3 answers

Come along with Joel, there is a simple WPF here .

+3
source

This would be a little inappropriate for winforms, the main motive of which is to expose common .Net controls to help developers create Windows applications that use a "standard" look. This does not mean that you will not find it, but first you should think about a third party. All that Microsoft provides is, at best, an afterthought.

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

+4
source

This is pretty easy to do on your own. Add a class, derive it from Control. You will need a timer that holds it; its Tick Tick method calls Invalidate (). Override OnPaint () to draw the numbers and am / pm indicator. You will need the TextRenderer.DrawText () overload, which draws inside the rectangle to get the numbers in the center. Draw a black line in the center.

It should be fun.

+2
source

Source: https://habr.com/ru/post/1310284/


All Articles