File tree 6 files changed +37
-14
lines changed
XCalendarFormsSample/XCalendarFormsSample
6 files changed +37
-14
lines changed Original file line number Diff line number Diff line change 84
84
<Setter Property =" TextColor" Value =" {StaticResource CalendarTertiaryColor}" />
85
85
</Style >
86
86
87
+ <Style x : Key =" DefaultEventIndicatorRectangleStyle" TargetType =" {x:Type Rectangle}" >
88
+ <Setter Property =" HeightRequest" Value =" 8" />
89
+ <Setter Property =" HorizontalOptions" Value =" CenterAndExpand" />
90
+ <Setter Property =" RadiusX" Value =" 100" />
91
+ <Setter Property =" RadiusY" Value =" 100" />
92
+ <Setter Property =" VerticalOptions" Value =" Center" />
93
+ <Setter Property =" WidthRequest" Value =" 8" />
94
+ </Style >
95
+
87
96
<Style x : Key =" DefaultPageStyle" TargetType =" {x:Type ContentPage}" >
88
97
<Setter Property =" BackgroundColor" Value =" {StaticResource PageBackgroundColor}" />
89
98
<Setter Property =" xct:SafeAreaEffect.SafeArea" Value =" True" />
Original file line number Diff line number Diff line change 8
8
xmlns : ViewModels =" clr-namespace:XCalendarFormsSample.ViewModels"
9
9
xmlns : xc =" clr-namespace:XCalendar.Forms.Views;assembly=XCalendar.Forms"
10
10
xmlns : xcConverters =" clr-namespace:XCalendar.Forms.Converters;assembly=XCalendar.Forms"
11
- xmlns : xcModels =" clr-namespace:XCalendar.Forms.Models;assembly=XCalendar.Forms"
12
11
xmlns : xct =" http://xamarin.com/schemas/2020/toolkit"
13
12
x : Name =" This"
14
13
Title =" Event Calendar"
94
93
IsToday =" {Binding IsToday}"
95
94
OtherMonthStyle =" {StaticResource DefaultDayViewOtherMonthStyle}" >
96
95
96
+ <xc : DayView .EventTemplate>
97
+ <DataTemplate x : DataType =" {x:Null}" >
98
+ <Rectangle
99
+ Fill =" {Binding Color}"
100
+ Style =" {StaticResource DefaultEventIndicatorRectangleStyle}" />
101
+ </DataTemplate >
102
+ </xc : DayView .EventTemplate>
103
+
97
104
<xc : DayView .CurrentMonthStyle>
98
105
<Style BasedOn =" {StaticResource DefaultDayViewCurrentMonthStyle}" TargetType =" {x:Type xc:DayView}" >
99
106
<Setter Property =" Command" Value =" {Binding BindingContext.ChangeDateSelectionCommand, Source={x:Reference This}}" />
Original file line number Diff line number Diff line change 1010
1010
<DataTemplate x : DataType =" {x:Null}" >
1011
1011
<Rectangle
1012
1012
Fill =" {Binding Color}"
1013
- HeightRequest =" 8"
1014
- HorizontalOptions =" CenterAndExpand"
1015
- RadiusX =" 100"
1016
- RadiusY =" 100"
1017
- VerticalOptions =" Center"
1018
- WidthRequest =" 8" />
1013
+ Style =" {StaticResource DefaultEventIndicatorRectangleStyle}" />
1019
1014
</DataTemplate >
1020
1015
</xc : DayView .EventTemplate>
1016
+
1021
1017
<xc : DayView .CurrentMonthStyle>
1022
1018
<Style BasedOn =" {StaticResource DefaultDayViewCurrentMonthStyle}" TargetType =" {x:Type xc:DayView}" >
1023
1019
<Setter Property =" BackgroundColor" Value =" {Binding BindingContext.DayCurrentMonthBackgroundColor, Source={x:Reference This}}" />
Original file line number Diff line number Diff line change 85
85
<Setter Property =" TextColor" Value =" {StaticResource CalendarTertiaryColor}" />
86
86
</Style >
87
87
88
+ <Style x : Key =" DefaultEventIndicatorRectangleStyle" TargetType =" {x:Type Rectangle}" >
89
+ <Setter Property =" HeightRequest" Value =" 8" />
90
+ <Setter Property =" HorizontalOptions" Value =" CenterAndExpand" />
91
+ <Setter Property =" RadiusX" Value =" 100" />
92
+ <Setter Property =" RadiusY" Value =" 100" />
93
+ <Setter Property =" VerticalOptions" Value =" Center" />
94
+ <Setter Property =" WidthRequest" Value =" 8" />
95
+ </Style >
96
+
88
97
<Style x : Key =" DefaultPageStyle" TargetType =" {x:Type ContentPage}" >
89
98
<Setter Property =" BackgroundColor" Value =" {StaticResource PageBackgroundColor}" />
90
99
<Setter Property =" Shell.BackgroundColor" Value =" {StaticResource PrimaryColor}" />
Original file line number Diff line number Diff line change 8
8
xmlns : mct =" http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
9
9
xmlns : xc =" clr-namespace:XCalendar.Maui.Views;assembly=XCalendar.Maui"
10
10
xmlns : xcConverters =" clr-namespace:XCalendar.Maui.Converters;assembly=XCalendar.Maui"
11
- xmlns : xcModels =" clr-namespace:XCalendar.Maui.Models;assembly=XCalendar.Maui"
12
11
x : Name =" This"
13
12
Title =" Event Calendar"
14
13
x : DataType =" {x:Type ViewModels:EventCalendarExampleViewModel}"
94
93
IsToday =" {Binding IsToday}"
95
94
OtherMonthStyle =" {StaticResource DefaultDayViewOtherMonthStyle}" >
96
95
96
+ <xc : DayView .EventTemplate>
97
+ <DataTemplate x : DataType =" {x:Null}" >
98
+ <Rectangle
99
+ Fill =" {Binding Color}"
100
+ Style =" {StaticResource DefaultEventIndicatorRectangleStyle}" />
101
+ </DataTemplate >
102
+ </xc : DayView .EventTemplate>
103
+
97
104
<xc : DayView .CurrentMonthStyle>
98
105
<Style BasedOn =" {StaticResource DefaultDayViewCurrentMonthStyle}" TargetType =" {x:Type xc:DayView}" >
99
106
<Setter Property =" Command" Value =" {Binding BindingContext.ChangeDateSelectionCommand, Source={x:Reference This}}" />
Original file line number Diff line number Diff line change 1051
1051
<DataTemplate x : DataType =" {x:Null}" >
1052
1052
<Rectangle
1053
1053
Fill =" {Binding Color}"
1054
- HeightRequest =" 8"
1055
- HorizontalOptions =" CenterAndExpand"
1056
- RadiusX =" 100"
1057
- RadiusY =" 100"
1058
- VerticalOptions =" Center"
1059
- WidthRequest =" 8" />
1054
+ Style =" {StaticResource DefaultEventIndicatorRectangleStyle}" />
1060
1055
</DataTemplate >
1061
1056
</xc : DayView .EventTemplate>
1062
1057
You can’t perform that action at this time.
0 commit comments