Get Month / SelectedMonth from Monthcalender or any Events?

Editors for WPF Forum

Posted 3 years ago by Sebastian Wrba - M.Sc., WSE GmbH
Version: 21.1.2
Avatar

Hi, 

is there a way to get an Event from the Month Calender when the "selected" month changes (without change the selectedDate)?

Or is it even possible to get the current selected month from the Month Calender in code behind, when it is different to the selected date?

Thanks for any help

BR Sebastian

Comments (3)

Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Sebastian,

The ActiveDate and ActiveViewMode (Month, Year, Decade, Century) are the two properties that govern which date ranges are currently shown in the control.

I don't believe we have a public event that fires when those properties change since they are mainly view-related and don't affect the SelectedDate itself.  

Does that give you enough information?  If not can you tell us more detail about the scenario you are looking to improve?  Thanks!


Actipro Software Support

Posted 3 years ago by Sebastian Wrba - M.Sc., WSE GmbH
Avatar

Hi, 

thanks for your answer. I want to display information based on the selected month and on the selected date. 

The selected date value I get from the SelectedDate Property and on the selectionChanged event I can alter the displayed Information for the day. 

What I want is to alter the information based on the selected Month.

Is there a way to get the events from the Buttons on the MonthCalendar (Left / Rigth) (Prev / Forw) or automatically select a Date from the current month in view?

Thanks!

BR Sebastian

Posted 3 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Sebastian,

The best thing to do would probably be bind the MonthCalendar's ActiveDate and ActiveViewMode properties to related properties on your view-model.  Then when your view-model property values are updated from a change in the active date/mode in the control, you can raise an event and alter your UI however you need.


Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.