Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
142058 | Jan 17,2019 03:23 AM UTC | Jan 24,2019 05:26 AM UTC | WPF | 7 |
![]() |
Tags: SfSchedule |
<ListView Grid.Row="1" Background="{TemplateBinding Background}"BorderBrush="Transparent">
<ListView.ItemsSource>
<MultiBinding Converter="{StaticResource AppoitmentConverter}">
<Binding RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType={x:Typesyncfusion:MonthViewItem}, AncestorLevel=1}" Path="Appointments"/>
<Binding Path="Date"RelativeSource="{RelativeSource Mode=TemplatedParent}"/>
</MultiBinding>
</ListView.ItemsSource>
<ListView.ItemTemplate>
<DataTemplate>
<WrapPanel>
<TextBlock Background="{Binding AppointmentBackground}" Text="{Binding Path=Subject}"Foreground="White"/>
</WrapPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView> |
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
{
Appointments = new ScheduleAppointmentCollection();
var VisibleAppointments = values[0] asScheduleAppointmentCollection;
var Date = values[1] as DateTime?;
if (VisibleAppointments == null || VisibleAppointments?.Count == 0)
return Appointments;
for (int i = 0; i < VisibleAppointments.Count; i++)
{
if (VisibleAppointments[i].StartTime.Date.Equals(Date))
Appointments.Add(VisibleAppointments[i]);
}
return Appointments;
} |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.