PlexityHide

Home 

Products 

Downloads 

Our Shop 

Support 

Contact 


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:     }
  11:  
  12:     if (e.Resolution == TimeResolution.years)
  13:     {
  14:         e.TextBlock.Text = e.Time.Year.ToString() + "A.D.";
  15:     }
  16:  
  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
  34:  
  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;
  42:  
  43:         }
  44:     }
  45:  
  46:  
  47: }

Comments:
great
 
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 sonebet.com. 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.
cleverpdf
 
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.
https://thepcsoft.com/studioline-photo-classic/
 
The information here is incredibly helpful! I've been researching security solutions for my home and stumbled upon this blog. I've been particularly interested in exploring options offered by Security Companies Perth. It seems like they've got quite a range of innovative services catering to various needs. Thank you for emphasizing the importance of proactive security measures.
 

Post a Comment

Subscribe to Post Comments [Atom]





<< Home

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

Subscribe to Posts [Atom]

Support

Support intro

Knowledgebase

FAQ phGantTimePackage

FAQ GTP.NET

FAQ general

History