Our Shop 



Thursday, April 22, 2010

Marking up certain days in the datescaler, Silverlight and WPF

Implement the event OnTextOutOverride, look at the code below where I mark up the 5:th of March, make Sundays red, and append “a.d” behind each year
   1: void dateScalerHorizontal_OnTextOutOverride(object sender, PlexityHide.GTP.TextOutOverrideArgs e)
   2: {
   3:     if (CBRedSundays.IsChecked==true)
   4:     {
   5:         if ((!e.IsUpperBand && e.Resolution == TimeResolution.days) && e.Time.DayOfWeek == DayOfWeek.Sunday)
   6:         {
   7:             e.TextBlock.FontWeight = FontWeights.ExtraBold;
   8:             e.TextBlock.Foreground = new SolidColorBrush(Colors.Red);
   9:         }
  10:     }
  12:     if (e.Resolution == TimeResolution.years)
  13:     {
  14:         e.TextBlock.Text = e.Time.Year.ToString() + "A.D.";
  15:     }
  17:     if (CBBirthday.IsChecked==true)
  18:     {
  19:         if (e.Time.Month == 3 && e.Time.Day == 5)
  20:         {
  21:             e.ReturnCanvasToUseInstead = new Canvas();
  22:             Ellipse ellipse = new Ellipse();
  23:             ellipse.Height = 20;
  24:             ellipse.Width = 20;
  25:             ellipse.StrokeThickness = 2;
  26:             ellipse.Stroke = new SolidColorBrush(Colors.Green);
  27:             ellipse.Fill = new SolidColorBrush(Colors.Yellow);
  28:             TranslateTransform trt = new TranslateTransform();
  29:             trt.X = -6;
  30:             trt.Y = -6;
  31:             ellipse.RenderTransform = trt;
  32:             e.ReturnCanvasToUseInstead.Children.Add(ellipse);
  33:             e.ReturnCanvasToUseInstead.Children.Add(e.TextBlock); // Adding the original text to our canvas
  35:             TextBlock tb = new TextBlock();
  36:             tb.Text = "My birthday! Sure hope I get cake...";
  37:             e.ReturnCanvasToUseInstead.Children.Add(tb);
  38:             TranslateTransform trt2 = new TranslateTransform();
  39:             trt2.X = 10;
  40:             trt2.Y = -20;
  41:             tb.RenderTransform = trt2;
  43:         }
  44:     }
  47: }

I have been searching for this kind of content where I can gain some recent updates with a clear examples.
best .net training
Dot net training 
This comment has been removed by the author.
This comment has been removed by the author.
keep up the good work. this is an Assam post. this to helpful, i have reading here all post. i am impressed. thank you. this is our digital marketing training center

Dot Net Training in Chennai | Dot Net Training in anna nagar | Dot Net Training in omr | Dot Net Training in porur | Dot Net Training in tambaram | Dot Net Training in velachery

Excellent read, I just passed this onto a friend who was doing some research on that. I will learn a lot of new stuff right here! Best of luck for the next! Please visit my web site Best Online Betting Singapore service provider.

This blog is therefore first-class to me. i can keep nearly coming here anew and by now anew. visit my companion as expertly..! ScreenHunter key
yes i am fully decided on amid this text and that i simply indulgent pronounce that this article is deeply best and pretty informative article.i will make hermetically sealed to be studying your blog extra. You made a fine lessening but I can't seasoned occurring but surprise, what kind of the including together facet? !!!!!!thank you!!!!!!! Norton Antivirus Key
I assume that is an informative proclaim and it is selected beneficial and informed. therefore, i might as soon as to thank you for the efforts you have got made in writing this newsletter. thank you! keep rocking. Happy Birthday Aunty Quotes
This site was post informative blog.
Phone Service USA provide internet-based phone calls to clients. The main advantage of using a Business Phone Systems Las Vegas is that it’s relatively cheap compared to traditional phone systems. In addition, there are no monthly calling limits with a VoIP service. It also provides users with greater call clarity and noise reduction compared to traditional phone systems. It’s also suitable for users with poor internet connection since it doesn’t require a high-speed connection. Users can make conference calls with other VoIP users without any restrictions.

Good Works. Keep it up.
nice blog keep posting.
Python Training in KPHB
Good Works. Keep it up.
Java Training in KPHB

Post a Comment

Subscribe to Post Comments [Atom]

<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]


Support intro


FAQ phGantTimePackage


FAQ general