-
Notifications
You must be signed in to change notification settings - Fork 704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Binding is not working for property which is of DateTimeOffset? Type #3721
Comments
@mageshsankar did you find this issue using Winui3 or system xaml (winui2)? |
I have found the issue in WinUi 3 Thanks |
@mageshsankar does this work with |
@stevenbrix issue occurs only for nullable type, as you suggested x:Bind is working properly for nullable DateTimeOffset , The same scenario(binding) working properly for nullable DateTime type. Issue only with nullable DateTimeOffset type |
Hi Team, Is there any workaround solution to resolve the binding issue in custom control(CustomPicker) itself instead of using x:bind in application level. |
Hi Team, Any update on this? |
I can't x:Bind the Date property of CalendarDatePicker to DateTimeOffset (nullable or not), without getting an exception in WinUI 3 Preview 4 |
Hi Team, |
Describe the bug
I am trying to bind value for property of nullable DateTimeOffset type, but binding does not work. But, when I manually set the value for particular property in code behind, it works properly. Please find the Code Snippet for the same below:
Expected behavior
Binding Should work as expected
XAML:
<Page.DataContext>
<local:ViewModel />
</Page.DataContext>
<local:CustomPicker x:Name="customPicker" NullableDateTime="{Binding SelectedDateTime, UpdateSourceTrigger=PropertyChanged}" />
C#:
public class ViewModel : INotifyPropertyChanged
{
private DateTimeOffset dateTime = new DateTimeOffset(new DateTime(2019, 1, 1));
Version Info
NuGet package version:
Windows app type:
Additional context
The text was updated successfully, but these errors were encountered: