We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

how to get DayCell focused

Thread ID:





140954 Nov 15,2018 03:33 PM UTC Nov 23,2018 09:47 AM UTC WPF 3
Tags: CalendarEdit
Wenkai Wang
Asked On November 15, 2018 03:33 PM UTC

Hi there,

i want to show a Popup window when some Day Cell is highlighted, like Mouse Over Effect. But there isn't any mouse over event. Could you help me. Thanks a lot!

Best regards



Kannan R [Syncfusion]
Replied On November 18, 2018 06:15 AM UTC

Hi Wenkai, 
Thank you for contacting Syncfusion Support.  
We have prepared simple example for your reference. In this example, we have configured DateCell MouseEnter event of today’s date alone.  
For example: 
If today’s date is 18th November, 2018 and then event will be raised for that.  
Code Snippet : [C#] 
        public ViewModel() 
            LoadedCommand = new DelegateCommand<object>((calendar) => 
                date.Year = DateTime.Now.Year;  
                date.Month = DateTime.Now.Month; 
                date.Day = DateTime.Now.Day; 
                DayGrid grid = VisualUtils.FindDescendant((calendar as CalendarEdit), typeof(DayGrid)) as DayGrid; 
                IEnumerable<Visual> cells = VisualUtils.EnumChildrenOfType(grid, typeof(DayCell)); 
                foreach (DayCell cell in cells) 
                    // This event will be called only for current Date Cell 
                    if(cell.Date == date) 
                        cell.MouseEnter += Item_MouseEnter;  
        private void Item_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e) 
            DayCell cell = sender as DayCell; 
            CalendarEdit calender = VisualUtils.FindAncestor(cell,typeof(CalendarEdit)) as CalendarEdit; 
           DateTime datetime = cell.Date.ToDateTime(calender.Calendar); 
            MessageBox.Show("Mouse hovered on "+ datetime.DayOfWeek + ", " + datetime.ToString("MMMM") + " " + datetime.Day + ", " + datetime.Year); 
Note: Similarly you can make use this approach to configure based on your requirement.  
Please let us know if it helps. 

Wenkai Wang
Replied On November 22, 2018 01:18 PM UTC

Hi Kannan, 

thanks for your sample! It's really helpful. May I ask you one more question? If I switch the month view, for example click the arrow to December and go back to November again, then the MouseEnter event can not be fired any more. Could you please try the workflow which I mentioned, and modify the code? 

Best regards

Kannan R [Syncfusion]
Replied On November 23, 2018 09:47 AM UTC

Hi Wenkai, 
Thank you for your update. 
We have checked and confirmed the reported case “DayCell MouseEnter event not invoked after changed the Month” in CalendarEdit is a defect. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon