Replies: 1 comment 2 replies
-
Hello, I think you use MVVM pattern. You can bind the Time property (Time span) and assign the value with the current time. If you don't use MVVM you can initialize the Time property in code behind. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello experts,
I would like to initialize the time picker in the XAML code of a .NET MAUI app with the current time.
To do this, I've declared the namespace like this
xmlns:sys="clr-namespace:System; assembly=mscorlib"
and added the following XAML code
When I build the app, I get the following error message:
XamlC error XFC0000: Cannot resolve type "clr-namespace:System; assembly=mscorlib:DateTime.Now"
What am I doing wrong?
By the way, if I initialize a date picker with the current date instead of the time picker, then this works:
Best regards,
Martin
Beta Was this translation helpful? Give feedback.
All reactions