Page Index Toggle Pages: 1 2 [3]  Send TopicPrint
Very Hot Topic (More than 25 Replies) customize view in monthly calendar (Read 28514 times)
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: customize view in monthly calendar
Reply #30 - Apr 4th, 2014 at 7:11am
Print Post  
The updated sample demonstrates a way to do it using triggers:

https://mindfusion.eu/_samples/_sample_CustomMonthCalendar8.zip

Regards,
Meppy
  
Back to top
 
IP Logged
 
vijayalakshmi
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 37
Joined: Mar 17th, 2014
Re: customize view in monthly calendar
Reply #31 - Apr 21st, 2014 at 5:25am
Print Post  
Hi Meppy,
In the snapshot attached below,
the calendar panel in the left has to display yellow color for the month button click event and simultaneously the month calendar has to be displayed in the right side.
In the current Custom month Calendar file which you provided, the navigation on the left calendar is not working fine with navigation on right calendar.

Please help me fixing this..
Waiting for your response.

Thanks,
Vij Smiley


  

month1234.PNG (Attachment deleted)
Back to top
 
IP Logged
 
vijayalakshmi
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 37
Joined: Mar 17th, 2014
Re: customize view in monthly calendar
Reply #32 - Apr 21st, 2014 at 8:22am
Print Post  
Hi,
Customizing calendar on left exactly as in snapshot is my priority...
I wana assign colors to current month days exactly as in snapshot...
Please help me on this...
Waiting for your response...

Thanks,
Viji Smiley
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: customize view in monthly calendar
Reply #33 - Apr 21st, 2014 at 11:16am
Print Post  
Hi,

To customize the Background/Foreground of the selected cells in a SingleMonth view, set the respective properties of the Calendar.MonthSettings.SelectedElementsHeaderStyle. For example, to make the Background and Foreground orange and black respectively, use the following code:

Code
Select All
calendar2.MonthSettings.SelectedElementsHeaderStyle.Background = new SolidColorBrush(Color.FromArgb(255, 251, 200, 79));
calendar2.MonthSettings.SelectedElementsHeaderStyle.Foreground = Brushes.Black; 


What do you mean by "the navigation on the left calendar is not working fine with navigation on right calendar."? In my sample the two calendars appear to be synchronized, that is, navigating in one updates the other and vice versa.

Regards,
Meppy
  
Back to top
 
IP Logged
 
vijayalakshmi
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 37
Joined: Mar 17th, 2014
Re: customize view in monthly calendar
Reply #34 - Apr 22nd, 2014 at 8:19am
Print Post  
Hi Meppy,
Thank you for the color customization code which you shared ...
I need to display current date in navigation control along with month and year. You suggested me to change string format to dd MMMM yyyy format..
But after running application, I am getting 01 Apr 2014 instead of current date i.e., 22 Apr 2014

One more thing is week range setting Apr 16 - Apr 22 2014.

Can you please share the code for this.
waiting for your response.

Thanks & Regards,
Viji Smiley
  
Back to top
 
IP Logged
 
vijayalakshmi
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 37
Joined: Mar 17th, 2014
Re: customize view in monthly calendar
Reply #35 - Apr 22nd, 2014 at 10:15am
Print Post  
Hi Meppy,
The week range is of high priority for me. Please help me on this.
Please find the snapshot attached.

Waiting for your response.

Thanks,
Viji Smiley
  

navi123456789.PNG (Attachment deleted)
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: customize view in monthly calendar
Reply #36 - Apr 22nd, 2014 at 10:44am
Print Post  
You can set the NavigationControl.Header property to whatever you need to be displayed in the navigation header. You can do this by binding the property in XAML or by manually setting it in the code behind, the same way you would do with any other property.

Regards,
Meppy
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: customize view in monthly calendar
Reply #37 - Apr 23rd, 2014 at 5:54am
Print Post  
Try the following:

Code
Select All
navigationControl.Header = DateTime.Today.ToString("dd MMMM yyyy"); 


Alternatively, define a dependency property of type DateTime, say CurrentDate, on your window, assign DateTime.Today to this property and bind to it in XAML:

Code
Select All
<l:NavigationControl Header="{Binding Path=CurrentDate, RelativeSource={RelativeSource AncestorType=l:MainWindow}, StringFormat='dd MMMM yyyy'}"> 


Setting the header in code might be more convenient if you need to display complex texts, such as "Apr 16 - Apr 22 2014".

Regards,
Meppy
  
Back to top
 
IP Logged
 
vijayalakshmi
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 37
Joined: Mar 17th, 2014
Re: customize view in monthly calendar
Reply #38 - Apr 23rd, 2014 at 7:31am
Print Post  
Hi Meppy,
The code which you gave ,navigationControl.Header = DateTime.Today.ToString("dd MMMM yyyy");

I must add this in MainWindow.xaml.cs or NavigationControl.cs ???
In the both the files I am getting an error.

Please can you provide the complete month calendar solution with this update???
Waiting for your reply...

Thanks,
Viji Smiley
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: customize view in monthly calendar
Reply #39 - Apr 23rd, 2014 at 10:46am
Print Post  
This sample demonstrates both approaches:

https://mindfusion.eu/_samples/_sample_CustomMonthCalendar9.zip
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 2 [3] 
Send TopicPrint