Describe the bug
Binding of the Days property of the CalendarView inside the DaysViewTemplate doesn't work; value changes aren't recognised until hot reload is triggered.
Expected behaviour
Binding of the Days property of the CalendarView inside the DaysViewTemplate doesn't require hot reload to be performed in order to start recognising value changes.
Steps to reproduce OR link to code
- Using any working CalendarView, set the
DaysViewTemplate property to the following ControlTemplate:
<ControlTemplate>
<VerticalStackLayout>
<Label Text="{Binding Days, Source={RelativeSource TemplatedParent}}"/>
<Label Text="{TemplateBinding Days}"/>
</VerticalStackLayout>
</ControlTemplate>
- Run the application and look at the
Labels' text; nothing shows up.
- Trigger XAML hot reload by using the button in VS
- The
Labels' text now shows up.
Xamarin Forms or .NET MAUI (If related to UI)
Both
Device Info (Optional)
Device Model: Samsung SM-G998B on BlueStacks 5 emulator
Android Version: 7.1 (API 25)
Additional Info
The way days are updated in the CalendarView and DaysView is by using the PropertyChanged callback of their respective bindable properties. In the DaysView, the CollectionView's ItemsSource property is set. In the CalendarView, the DaysView's Days property is set. This was originally done because binding to those properties didn't work, though I don't remember if I figured out why.
Describe the bug
Binding of the
Daysproperty of theCalendarViewinside theDaysViewTemplatedoesn't work; value changes aren't recognised until hot reload is triggered.Expected behaviour
Binding of the
Daysproperty of theCalendarViewinside theDaysViewTemplatedoesn't require hot reload to be performed in order to start recognising value changes.Steps to reproduce OR link to code
DaysViewTemplateproperty to the followingControlTemplate:Labels' text; nothing shows up.Labels' text now shows up.Xamarin Forms or .NET MAUI (If related to UI)
Both
Device Info (Optional)
Device Model: Samsung SM-G998B on BlueStacks 5 emulator
Android Version: 7.1 (API 25)
Additional Info
The way days are updated in the
CalendarViewandDaysViewis by using the PropertyChanged callback of their respective bindable properties. In theDaysView, theCollectionView'sItemsSourceproperty is set. In theCalendarView, theDaysView'sDaysproperty is set. This was originally done because binding to those properties didn't work, though I don't remember if I figured out why.