Skip to content

Passing DateTime of a day in viewmodel to make more control for background changing #111

Open
@masterofdaemon

Description

@masterofdaemon

Hello, i have a problem with some logic, how can i pass here DateTime of a day instead static one 9-2-2023 ?

<xc:CalendarView.DayTemplate>
                <DataTemplate x:DataType="{x:Type xcModels:CalendarDay}">
                    <Border
                        Margin="2.5"
                        BackgroundColor="{Binding BindingContext.ObservableParameters[9-2-2023], Source={x:Reference This},

or how i can make it in c#?

new CalendarView{ VerticalOptions = LayoutOptions.Start}
				.Bind(CalendarView.DaysProperty, static(WorkDayViewModel vm) => vm.Calendar.Days)
				.Bind(CalendarView.DaysOfWeekProperty, static(WorkDayViewModel vm) => vm.Calendar.DayNamesOrder)

i can't make children of it and this solution is faster i think

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting-authorAwaiting a respose from the authorenhancementNew feature or requestquestionA question to be answered

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions