I am following MVVM structure in my Xamarin app development. I have used XamForms.Controls.Calendar in order to show calendar on my app. The TitleLabelText property of the calendar allows me to display the month on the title of the page. I have used in my App.xaml in order to display Title label as (e.g. March 2020). But I want it to be uppercase. (like MARCH 2020). Is there any way I can change it to uppercase in my code?
Below is the screen showing "January 2020" , but I want it as "JANUARY 2020".
Answers
I tested a demo about the plugin, but TitleLabelText property could not be displayed. If you could mark show properly, you can customize XamForms.Controls.Calendar class to convert the value to uppercase. Or create an Effect to achieve the function.
Check the link:
https://stackoverflow.com/questions/45936869/display-label-text-in-uppercase-using-xaml-in-xamarin-forms
https://github.com/xamarin/XamarinCommunityToolkit/blob/dev/docs/Effects/Entry/CapitalizeKeyboard.md
I can use TitleLabelText.ToUpper(), infact I have used it. But the only issue is that suppose I am on calendar April 2020, and I click left button on my calendar, then the value that is coming in TitleLabelText is April, not March. So, I am unable to convert the March month to uppercase, because this March value is not coming in TitleLabelText property.
Does it explain my problem? [Yes] [No]
We cannot specify a value to Calendar.TitleLabel property because the set method is protected.
You can report the requirement on github to the author to get for professional help.