File tree Expand file tree Collapse file tree 38 files changed +525
-403
lines changed
samples/XCT.Sample/Pages/Views Expand file tree Collapse file tree 38 files changed +525
-403
lines changed Original file line number Diff line number Diff line change 3
3
4
4
<PropertyGroup >
5
5
<LangVersion >8.0</LangVersion >
6
+ <!-- Publish the repository URL in the built .nupkg (in the NuSpec <Repository> element) -->
7
+ <PublishRepositoryUrl >true</PublishRepositoryUrl >
8
+ <!-- Embed source files that are not tracked by the source control manager in the PDB -->
9
+ <EmbedUntrackedSources >true</EmbedUntrackedSources >
10
+ <!-- Build symbol package (.snupkg) to distribute the PDB containing Source Link -->
11
+ <IncludeSymbols >true</IncludeSymbols >
12
+ <SymbolPackageFormat >snupkg</SymbolPackageFormat >
13
+ <DebugType >embedded</DebugType >
6
14
</PropertyGroup >
7
15
8
16
<PropertyGroup >
Original file line number Diff line number Diff line change 3
3
xmlns : x =" http://schemas.microsoft.com/winfx/2009/xaml"
4
4
xmlns : xct =" http://xamarin.com/schemas/2020/toolkit"
5
5
xmlns : local =" clr-namespace:Xamarin.CommunityToolkit.Sample.Pages.Views.Popups"
6
+ Size =" {x:Static local:PopupSize.Medium}"
6
7
x : Class =" Xamarin.CommunityToolkit.Sample.Pages.Views.Popups.ButtonPopup" >
7
8
8
- <xct : Popup .Size>
9
- <OnPlatform x : TypeArguments =" Size" >
10
- <OnPlatform .Platforms>
11
- <On Platform =" Android" Value =" {x:Static local:PopupSize.Android}" />
12
- <On Platform =" UWP" Value =" {x:Static local:PopupSize.UWP}" />
13
- <On Platform =" iOS" Value =" {x:Static local:PopupSize.iOS}" />
14
- </OnPlatform .Platforms>
15
- </OnPlatform >
16
- </xct : Popup .Size>
17
-
18
9
<xct : Popup .Resources>
19
10
<ResourceDictionary >
20
11
<Style x : Key =" Title" TargetType =" Label" >
53
44
Clicked =" Button_Clicked" />
54
45
</StackLayout >
55
46
56
- </xct : Popup >
47
+ </xct : Popup >
Original file line number Diff line number Diff line change 3
3
xmlns : x =" http://schemas.microsoft.com/winfx/2009/xaml"
4
4
xmlns : xct =" http://xamarin.com/schemas/2020/toolkit"
5
5
xmlns : local =" clr-namespace:Xamarin.CommunityToolkit.Sample.Pages.Views.Popups"
6
+ Size =" {x:Static local:PopupSize.Large}"
6
7
x : Class =" Xamarin.CommunityToolkit.Sample.Pages.Views.Popups.CsharpBindingPopup" >
7
8
8
- <xct : Popup .Size>
9
- <OnPlatform x : TypeArguments =" Size" >
10
- <OnPlatform .Platforms>
11
- <On Platform =" Android" Value =" {x:Static local:PopupSize.Android}" />
12
- <On Platform =" UWP" Value =" {x:Static local:PopupSize.UWP}" />
13
- <On Platform =" iOS" Value =" {x:Static local:PopupSize.iOS}" />
14
- </OnPlatform .Platforms>
15
- </OnPlatform >
16
- </xct : Popup .Size>
17
-
18
9
<xct : Popup .Resources>
19
10
<ResourceDictionary >
20
11
<Style x : Key =" Title" TargetType =" Label" >
47
38
Text =" {Binding Message}" />
48
39
</StackLayout >
49
40
50
- </xct : Popup >
41
+ </xct : Popup >
Original file line number Diff line number Diff line change 3
3
xmlns : x =" http://schemas.microsoft.com/winfx/2009/xaml"
4
4
xmlns : xct =" http://xamarin.com/schemas/2020/toolkit"
5
5
xmlns : local =" clr-namespace:Xamarin.CommunityToolkit.Sample.Pages.Views.Popups"
6
+ Size =" {x:Static local:PopupSize.Medium}"
6
7
x : Class =" Xamarin.CommunityToolkit.Sample.Pages.Views.Popups.MultipleButtonPopup" >
7
8
8
- <xct : Popup .Size>
9
- <OnPlatform x : TypeArguments =" Size" >
10
- <OnPlatform .Platforms>
11
- <On Platform =" Android" Value =" {x:Static local:PopupSize.Android}" />
12
- <On Platform =" UWP" Value =" {x:Static local:PopupSize.UWP}" />
13
- <On Platform =" iOS" Value =" {x:Static local:PopupSize.iOS}" />
14
- </OnPlatform .Platforms>
15
- </OnPlatform >
16
- </xct : Popup .Size>
17
-
18
9
<xct : Popup .Resources>
19
10
<ResourceDictionary >
20
11
<Style x : Key =" Title" TargetType =" Label" >
67
58
68
59
</StackLayout >
69
60
70
- </xct : Popup >
61
+ </xct : Popup >
Original file line number Diff line number Diff line change 3
3
xmlns : x =" http://schemas.microsoft.com/winfx/2009/xaml"
4
4
xmlns : xct =" http://xamarin.com/schemas/2020/toolkit"
5
5
xmlns : local =" clr-namespace:Xamarin.CommunityToolkit.Sample.Pages.Views.Popups"
6
+ Size =" {x:Static local:PopupSize.Medium}"
6
7
IsLightDismissEnabled =" False"
7
8
x : Class =" Xamarin.CommunityToolkit.Sample.Pages.Views.Popups.NoLightDismissPopup" >
8
9
9
- <xct : Popup .Size>
10
- <OnPlatform x : TypeArguments =" Size" >
11
- <OnPlatform .Platforms>
12
- <On Platform =" Android" Value =" {x:Static local:PopupSize.Android}" />
13
- <On Platform =" UWP" Value =" {x:Static local:PopupSize.UWP}" />
14
- <On Platform =" iOS" Value =" {x:Static local:PopupSize.iOS}" />
15
- </OnPlatform .Platforms>
16
- </OnPlatform >
17
- </xct : Popup .Size>
18
-
19
10
<xct : Popup .Resources>
20
11
<ResourceDictionary >
21
12
<Style x : Key =" Title" TargetType =" Label" >
57
48
Clicked =" Button_Clicked" />
58
49
</StackLayout >
59
50
60
- </xct : Popup >
51
+ </xct : Popup >
Original file line number Diff line number Diff line change 3
3
xmlns : x =" http://schemas.microsoft.com/winfx/2009/xaml"
4
4
xmlns : xct =" http://xamarin.com/schemas/2020/toolkit"
5
5
xmlns : local =" clr-namespace:Xamarin.CommunityToolkit.Sample.Pages.Views.Popups"
6
+ Size =" {x:Static local:PopupSize.Medium}"
6
7
x : Class =" Xamarin.CommunityToolkit.Sample.Pages.Views.Popups.OpenedEventSimplePopup" >
7
8
8
- <xct : Popup .Size>
9
- <OnPlatform x : TypeArguments =" Size" >
10
- <OnPlatform .Platforms>
11
- <On Platform =" Android" Value =" {x:Static local:PopupSize.Android}" />
12
- <On Platform =" UWP" Value =" {x:Static local:PopupSize.UWP}" />
13
- <On Platform =" iOS" Value =" {x:Static local:PopupSize.iOS}" />
14
- </OnPlatform .Platforms>
15
- </OnPlatform >
16
- </xct : Popup .Size>
17
-
18
9
<xct : Popup .Resources>
19
10
<ResourceDictionary >
20
11
<Style x : Key =" Title" TargetType =" Label" >
47
38
Style =" {StaticResource Content}" />
48
39
</StackLayout >
49
40
50
- </xct : Popup >
41
+ </xct : Popup >
Original file line number Diff line number Diff line change 1
- using Xamarin . Forms ;
1
+ using Xamarin . Essentials ;
2
+ using Xamarin . Forms ;
2
3
3
4
namespace Xamarin . CommunityToolkit . Sample . Pages . Views . Popups
4
5
{
5
6
static class PopupSize
6
7
{
7
- public static Size Android => new Size ( 1000 , 1200 ) ;
8
+ // examples for fixed sizes
9
+ public static Size Tiny => new Size ( 100 , 100 ) ;
8
10
9
- public static Size iOS => new Size ( 250 , 350 ) ;
10
-
11
- public static Size UWP => new Size ( 300 , 400 ) ;
11
+ public static Size Small => new Size ( 300 , 300 ) ;
12
+
13
+ // examples for relative to screen sizes
14
+ public static Size Medium => new Size ( 0.7 * ( DeviceDisplay . MainDisplayInfo . Width / DeviceDisplay . MainDisplayInfo . Density ) , 0.6 * ( DeviceDisplay . MainDisplayInfo . Height / DeviceDisplay . MainDisplayInfo . Density ) ) ;
15
+
16
+ public static Size Large => new Size ( 0.9 * ( DeviceDisplay . MainDisplayInfo . Width / DeviceDisplay . MainDisplayInfo . Density ) , 0.8 * ( DeviceDisplay . MainDisplayInfo . Height / DeviceDisplay . MainDisplayInfo . Density ) ) ;
12
17
}
13
18
}
Original file line number Diff line number Diff line change 3
3
xmlns : x =" http://schemas.microsoft.com/winfx/2009/xaml"
4
4
xmlns : xct =" http://xamarin.com/schemas/2020/toolkit"
5
5
xmlns : local =" clr-namespace:Xamarin.CommunityToolkit.Sample.Pages.Views.Popups"
6
+ Size =" {x:Static local:PopupSize.Medium}"
6
7
x : Class =" Xamarin.CommunityToolkit.Sample.Pages.Views.Popups.ReturnResultPopup"
7
8
x : TypeArguments =" x:String" >
8
9
9
- <xct : Popup .Size>
10
- <OnPlatform x : TypeArguments =" Size" >
11
- <OnPlatform .Platforms>
12
- <On Platform =" Android" Value =" {x:Static local:PopupSize.Android}" />
13
- <On Platform =" UWP" Value =" {x:Static local:PopupSize.UWP}" />
14
- <On Platform =" iOS" Value =" {x:Static local:PopupSize.iOS}" />
15
- </OnPlatform .Platforms>
16
- </OnPlatform >
17
- </xct : Popup .Size>
18
-
19
10
<xct : Popup .Resources>
20
11
<ResourceDictionary >
21
12
<Style x : Key =" Title" TargetType =" Label" >
54
45
Clicked =" Button_Clicked" />
55
46
</StackLayout >
56
47
57
- </xct : Popup >
48
+ </xct : Popup >
Original file line number Diff line number Diff line change 3
3
xmlns : x =" http://schemas.microsoft.com/winfx/2009/xaml"
4
4
xmlns : xct =" http://xamarin.com/schemas/2020/toolkit"
5
5
xmlns : local =" clr-namespace:Xamarin.CommunityToolkit.Sample.Pages.Views.Popups"
6
+ Size =" {x:Static local:PopupSize.Small}"
6
7
x : Class =" Xamarin.CommunityToolkit.Sample.Pages.Views.Popups.SimplePopup" >
7
8
8
- <xct : Popup .Size>
9
- <OnPlatform x : TypeArguments =" Size" >
10
- <OnPlatform .Platforms>
11
- <On Platform =" Android" Value =" {x:Static local:PopupSize.Android}" />
12
- <On Platform =" UWP" Value =" {x:Static local:PopupSize.UWP}" />
13
- <On Platform =" iOS" Value =" {x:Static local:PopupSize.iOS}" />
14
- </OnPlatform .Platforms>
15
- </OnPlatform >
16
- </xct : Popup .Size>
17
-
18
9
<xct : Popup .Resources>
19
10
<ResourceDictionary >
20
11
<Style x : Key =" Title" TargetType =" Label" >
47
38
Text =" This is a native popup with a Xamarin.Forms View being rendered. The behaviors of the popup will confirm to 100% native look and feel, but still allows you to use your Xamarin.Forms controls." />
48
39
</StackLayout >
49
40
50
- </xct : Popup >
41
+ </xct : Popup >
Original file line number Diff line number Diff line change 3
3
xmlns : x =" http://schemas.microsoft.com/winfx/2009/xaml"
4
4
xmlns : xct =" http://xamarin.com/schemas/2020/toolkit"
5
5
xmlns : local =" clr-namespace:Xamarin.CommunityToolkit.Sample.Pages.Views.Popups"
6
+ Size =" {x:Static local:PopupSize.Medium}"
6
7
x : Class =" Xamarin.CommunityToolkit.Sample.Pages.Views.Popups.ToggleSizePopup" >
7
8
8
- <xct : Popup .Size>
9
- <OnPlatform x : TypeArguments =" Size" >
10
- <OnPlatform .Platforms>
11
- <On Platform =" Android" Value =" {x:Static local:PopupSize.Android}" />
12
- <On Platform =" UWP" Value =" {x:Static local:PopupSize.UWP}" />
13
- <On Platform =" iOS" Value =" {x:Static local:PopupSize.iOS}" />
14
- </OnPlatform .Platforms>
15
- </OnPlatform >
16
- </xct : Popup .Size>
17
-
18
9
<xct : Popup .Resources>
19
10
<ResourceDictionary >
20
11
<Style x : Key =" Title" TargetType =" Label" >
53
44
Clicked =" Button_Clicked" />
54
45
</StackLayout >
55
46
56
- </xct : Popup >
47
+ </xct : Popup >
You can’t perform that action at this time.
0 commit comments