|
11 | 11 | <Grid.DataContext> |
12 | 12 | <local:HeatMapViewModel /> |
13 | 13 | </Grid.DataContext> |
14 | | - <Grid.Resources> |
15 | | - <DataTemplate x:Key="lightGrayTemplate"> |
16 | | - <Grid Background="#eeeeee"> |
17 | | - <TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5" Text="{Binding DateText}" /> |
18 | | - </Grid> |
19 | | - </DataTemplate> |
20 | | - <DataTemplate x:Key="lightGreenTemplate"> |
21 | | - <Grid Background="#c6e48b"> |
22 | | - <TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5" Text="{Binding DateText}" /> |
23 | | - </Grid> |
24 | | - </DataTemplate> |
25 | | - <DataTemplate x:Key="midGreenTemplate"> |
26 | | - <Grid Background="#7bc96f"> |
27 | | - <TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5" Text="{Binding DateText}" /> |
28 | | - </Grid> |
29 | | - </DataTemplate> |
30 | | - <DataTemplate x:Key="greenTemplate"> |
31 | | - <Grid Background="#239a3b"> |
32 | | - <TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5" Text="{Binding DateText}" /> |
33 | | - </Grid> |
34 | | - </DataTemplate> |
35 | | - <DataTemplate x:Key="darkGreenTemplate"> |
36 | | - <Grid Background="#196127"> |
37 | | - <TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5" Text="{Binding DateText}" /> |
38 | | - </Grid> |
39 | | - </DataTemplate> |
40 | | - <local:MonthCellTemplateSelector x:Key="monthCellTemplateSelector" |
41 | | - LightGrayTemplate="{StaticResource lightGrayTemplate}" |
42 | | - LightGreenTemplate="{StaticResource lightGreenTemplate}" |
43 | | - MidGreenTemplate="{StaticResource midGreenTemplate}" |
44 | | - GreenTemplate="{StaticResource greenTemplate}" |
45 | | - DarkGreenTemplate="{StaticResource darkGreenTemplate}" /> |
46 | | - </Grid.Resources> |
| 14 | + |
47 | 15 | <Grid.RowDefinitions> |
48 | 16 | <RowDefinition Height="*"/> |
49 | 17 | <RowDefinition Height="100"/> |
50 | 18 | </Grid.RowDefinitions> |
51 | 19 | <Scheduler:SfScheduler x:Name="scheduler" |
52 | | - ItemsSource="{Binding InternetDataCollection}" |
| 20 | + ItemsSource="{Binding InternetDataUsages}" |
53 | 21 | AppointmentEditFlag="None"> |
| 22 | + <!--The collection of internet data object can be assigned to the scheduler ItemsSource property in order to generate the details of appointments in the MonthCell which is used to get the details of the internet data usage for the day--> |
54 | 23 | <Scheduler:SfScheduler.AppointmentMapping> |
55 | 24 | <Scheduler:AppointmentMapping StartTime="Date" |
56 | 25 | AppointmentBackground="Color"/> |
57 | 26 | </Scheduler:SfScheduler.AppointmentMapping> |
58 | 27 | <Scheduler:SfScheduler.MonthViewSettings> |
59 | | - <Scheduler:MonthViewSettings AppointmentDisplayMode="None" |
60 | | - MonthCellTemplateSelector="{StaticResource monthCellTemplateSelector}" /> |
| 28 | + <Scheduler:MonthViewSettings AppointmentDisplayMode="None"> |
| 29 | + <!--Declare the DataTemplate for the scheduler month cell in order to create the heatmap calendar--> |
| 30 | + <Scheduler:MonthViewSettings.MonthCellTemplate> |
| 31 | + <DataTemplate> |
| 32 | + <Grid Background="{Binding Appointments[0].Data.Color}"> |
| 33 | + <TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5" Text="{Binding DateText}" /> |
| 34 | + </Grid> |
| 35 | + </DataTemplate> |
| 36 | + </Scheduler:MonthViewSettings.MonthCellTemplate> |
| 37 | + </Scheduler:MonthViewSettings> |
61 | 38 | </Scheduler:SfScheduler.MonthViewSettings> |
62 | 39 | </Scheduler:SfScheduler> |
63 | 40 | <Grid Grid.Row="1"> |
|
0 commit comments