Skip to content
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

Page does not load if CalendarView's IsVisible property is set. #187

Open
oguja opened this issue May 13, 2024 · 2 comments
Open

Page does not load if CalendarView's IsVisible property is set. #187

oguja opened this issue May 13, 2024 · 2 comments
Labels
bug Something isn't working ios

Comments

@oguja
Copy link

oguja commented May 13, 2024

Hi there,

I seem to be having a problem on IOS where if I set the IsVisible property on CalendarView, the ContentPage hosting it will not load. My intention was to control the property from a view model, but I couldn't even get that far. Simply setting the property with the literal "False" repros the issue.

I can't speak for Android as I have not tested on it.

Expected behaviour
I expect the CalendarView to be loaded on its host page and appear/disappear accordingly depending on how the IsVisible property has been set.

Steps to reproduce OR link to code
I have tried this with a new AppShell tabbed project and a new App Project.

Repro steps for the AppShell project are:

  1. Simply create a new AppShell Project.
  2. Create a MyCalendar Property in one of the ViewModels of the tab pages (I chose the ItemsViewModel VM)
  3. Add the CalendarView control on the ItemsPage.xaml (I did so verbatim from the getting-started page).
  4. Include an IsVisible property to the control in the Xaml.
  5. Run the project and when the app comes up, try selecting the Items tab and it hangs the app.

I have attached the sample AppShell project.
xCalendarTest.zip

Both tests use the simple example shown on the XCalendar's getting-started page repeated below:

VM
public Calendar<CalendarDay> MyCalendar { get; set; } = new Calendar<CalendarDay>();

XAML

        <views:CalendarView
            IsVisible="False"   <----- Problem
            Days="{Binding MyCalendar.Days}"
            DaysOfWeek="{Binding MyCalendar.DayNamesOrder}"
            NavigatedDate="{Binding MyCalendar.NavigatedDate}"/>

Test details:
Platform: Xamarin Forms (5.0.0.2662)
Calendar (4.6.0)
Tested Device: iPhone 15 Pro Max (IOS 17.4 & 17.2)

@ME-MarvinE
Copy link
Owner

ME-MarvinE commented May 13, 2024

I tested on a virtual Android 7.1 device setting IsVisible to both "True" and "False" and it works in both cases. When I select one of the items it shows the modal with the title and description. I've also looked for MAUI issues to do with the IsVisible property and haven't found anything relevant - I can't do much else without an IOS device.

The CalendarView doesn't do anything with the default properties. Do you see any errors in the output window or Error List windows once you select an item?

@oguja
Copy link
Author

oguja commented May 14, 2024

Apologies for not being clear, but you can reproduce the behaviour with the IOS simulators of those devices.

And no, I don't see any errors in the output window or the debug window when debugging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ios
Projects
None yet
Development

No branches or pull requests

2 participants