-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
CircleMaskPage.xaml
65 lines (62 loc) · 3.19 KB
/
CircleMaskPage.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:cz="clr-namespace:FunctionZero.Maui.Controls;assembly=FunctionZero.Maui.Controls"
x:Class="SampleApp.Mvvm.Pages.Mask.CircleMaskPage"
Title="CircleMaskPage">
<ContentPage.ControlTemplate>
<ControlTemplate>
<cz:MaskZero
BackgroundAlphaRequest="{TemplateBinding BindingContext.BackgroundAlpha}"
MaskTargetName="{TemplateBinding BindingContext.TargetName}"
MovementEasing="{x:Static Easing.CubicInOut}"
MaskRoundnessEasing="{x:Static Easing.CubicInOut}"
Duration="450"
MaskColorRequest="{TemplateBinding BindingContext.MaskColor}"
MaskEdgeColorRequest="{TemplateBinding BindingContext.MaskEdgeColor}"
MaskRoundnessRequest="{TemplateBinding BindingContext.MaskRoundness}"
MaskEdgeThicknessRequest="{TemplateBinding BindingContext.MaskEdgeThickness}"
>
<cz:MaskZero.Content>
<ContentPresenter/>
</cz:MaskZero.Content>
</cz:MaskZero>
</ControlTemplate>
</ContentPage.ControlTemplate>
<ScrollView>
<Grid RowDefinitions="*,*" ColumnDefinitions="*,*" HeightRequest="900">
<Label Grid.Row="0" Grid.Column="0"
Text="Banana!" FontSize="32" cz:MaskZero.MaskName="banana" BackgroundColor="Yellow"
VerticalOptions="Center"
HorizontalOptions="Center" />
<Label Grid.Row="0" Grid.Column="1"
Text="Radish!" FontSize="32" cz:MaskZero.MaskName="radish" BackgroundColor="Yellow"
VerticalOptions="Center"
HorizontalOptions="Center" />
<Label Grid.Row="1" Grid.Column="0"
Text="Melon!" FontSize="32" cz:MaskZero.MaskName="melon" BackgroundColor="Yellow"
VerticalOptions="Center"
HorizontalOptions="Center" />
<VerticalStackLayout Grid.Row="1" Grid.Column="1" cz:MaskZero.MaskName="grapefruit" VerticalOptions="Center" HorizontalOptions="Center">
<Label
Text="Grapefruit!" FontSize="32" BackgroundColor="Yellow"
VerticalOptions="Center"
HorizontalOptions="Center"/>
<Label
Text="Grapefruit!" FontSize="32" BackgroundColor="Yellow"
VerticalOptions="Center"
HorizontalOptions="Center"/>
</VerticalStackLayout>
<!--<cz:MaskZero.Tooltip>
--><!--
Can put any ContentControl here; a TooltipZero allows behavioural properties to be set.
Maybe dodge it entirely and use attached properties? E.g. MaskZero.TooltipPosition, ~.Fade, ~.
--><!--
<cz:TooltipZero PositionInfo="Above, Left">
<Label Text="Tap for Grapefruit"/>
</cz:TooltipZero>
<Label Text=""
</cz:MaskZero.Tooltip>-->
</Grid>
</ScrollView>
</ContentPage>