ME-MarvinE / XCalendar

A plugin for .NET providing an API for representing a calendar along with fully customisable calendar controls for Xamarin Forms and .NET MAUI
MIT License
296 stars 36 forks source link

NavigationViewTemplate Property Not Found #71

Open DavidChaiOne opened 1 year ago

DavidChaiOne commented 1 year ago

Describe the bug UI Fails to load when attempting to create a control Template via the NavigationViewTemplate Property in Xaml.

Expected behavior Able to create a control Template via the NavigationViewTemplate Property in Xaml. Steps to reproduce OR link to code

                <xc:CalendarView
                    x:Name="MyCally"
                    Days="{Binding Calendar.Days}"
                    DaysOfWeek="{Binding Calendar.DayNamesOrder}"
                    NavigatedDate="{Binding Calendar.NavigatedDate}">
                    <xc:CalendarView.NavigationViewTemplate>
                        <ControlTemplate>
                            <Label Text=" asdfasdfasdf" />
                        </ControlTemplate>
                    </xc:CalendarView.NavigationViewTemplate>
                </xc:CalendarView>

Xamarin Forms or .NET MAUI (If related to UI) Xamarin.Forms Additional context (Optional) Occurs in XCalendar.Forms 4.2.0 works fine in XCalendar.Forms 4.0.0 and 4.1.0 Device Info (Optional) Device Model: Android Version: IOS Version: Windows Version: Screenshot 2022-11-17 at 9 16 09 AM

ME-MarvinE commented 1 year ago

Are you able to run the sample app? Every example makes use of the NavigationViewTemplate property so see if you can get to at least one of those pages. What happens if you try to reference NavigationViewTemplate using a CalendarView in C#?

ME-MarvinE commented 1 year ago

Could not replicate the issue using this repo

DavidChaiOne commented 1 year ago

Could not replicate the issue using this repo

Repo not accessible. Error occurs on 4.2.0 consistently.

ME-MarvinE commented 1 year ago

Repo is public now. Are you able to run it without issues?

DavidChaiOne commented 1 year ago

Ran your repo, works as expected

DavidChaiOne commented 1 year ago

This breaks the code

 <xcViews:CalendarView
            x:Name="cally"
            Grid.Row="1"
            Days="{Binding Calendar.Days}"
            DaysOfWeek="{Binding Calendar.DayNamesOrder}"
            NavigatedDate="{Binding Calendar.NavigatedDate}">
            <xcViews:CalendarView.NavigationViewTemplate>
                <ControlTemplate>
                    <xcViews:NavigationView HeightRequest="0" />
                </ControlTemplate>
            </xcViews:CalendarView.NavigationViewTemplate>
            <xcViews:CalendarView.GestureRecognizers>
                <SwipeGestureRecognizer
                    Command="{Binding SwipeCommand}"
                    CommandParameter="Left"
                    Direction="Left" />
                <SwipeGestureRecognizer
                    Command="{Binding SwipeCommand}"
                    CommandParameter="Right"
                    Direction="Right" />
            </xcViews:CalendarView.GestureRecognizers>
            <xcViews:CalendarView.DayTemplate>
                <DataTemplate>
                    <xcViews:DayView TextColor="#0A50E0" />
                </DataTemplate>
            </xcViews:CalendarView.DayTemplate>
        </xcViews:CalendarView>
ME-MarvinE commented 1 year ago

In what way does it break the code? What warnings/errors do you get? Or is there unexpected behaviour?

ME-MarvinE commented 6 months ago

@DavidChaiOne are you still experiencing this issue?