Skip to content

Commit 8a5e4fc

Browse files
authored
Merge pull request #1 from xamarin/develop
Develop
2 parents c9b606a + e1af2ad commit 8a5e4fc

38 files changed

+525
-403
lines changed

Directory.Build.props

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33

44
<PropertyGroup>
55
<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>
614
</PropertyGroup>
715

816
<PropertyGroup>

samples/XCT.Sample/Pages/Views/Popups/ButtonPopup.xaml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,9 @@
33
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
44
xmlns:xct="http://xamarin.com/schemas/2020/toolkit"
55
xmlns:local="clr-namespace:Xamarin.CommunityToolkit.Sample.Pages.Views.Popups"
6+
Size="{x:Static local:PopupSize.Medium}"
67
x:Class="Xamarin.CommunityToolkit.Sample.Pages.Views.Popups.ButtonPopup">
78

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-
189
<xct:Popup.Resources>
1910
<ResourceDictionary>
2011
<Style x:Key="Title" TargetType="Label">
@@ -53,4 +44,4 @@
5344
Clicked="Button_Clicked" />
5445
</StackLayout>
5546

56-
</xct:Popup>
47+
</xct:Popup>

samples/XCT.Sample/Pages/Views/Popups/CsharpBindingPopup.xaml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,9 @@
33
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
44
xmlns:xct="http://xamarin.com/schemas/2020/toolkit"
55
xmlns:local="clr-namespace:Xamarin.CommunityToolkit.Sample.Pages.Views.Popups"
6+
Size="{x:Static local:PopupSize.Large}"
67
x:Class="Xamarin.CommunityToolkit.Sample.Pages.Views.Popups.CsharpBindingPopup">
78

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-
189
<xct:Popup.Resources>
1910
<ResourceDictionary>
2011
<Style x:Key="Title" TargetType="Label">
@@ -47,4 +38,4 @@
4738
Text="{Binding Message}" />
4839
</StackLayout>
4940

50-
</xct:Popup>
41+
</xct:Popup>

samples/XCT.Sample/Pages/Views/Popups/MultipleButtonPopup.xaml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,9 @@
33
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
44
xmlns:xct="http://xamarin.com/schemas/2020/toolkit"
55
xmlns:local="clr-namespace:Xamarin.CommunityToolkit.Sample.Pages.Views.Popups"
6+
Size="{x:Static local:PopupSize.Medium}"
67
x:Class="Xamarin.CommunityToolkit.Sample.Pages.Views.Popups.MultipleButtonPopup">
78

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-
189
<xct:Popup.Resources>
1910
<ResourceDictionary>
2011
<Style x:Key="Title" TargetType="Label">
@@ -67,4 +58,4 @@
6758

6859
</StackLayout>
6960

70-
</xct:Popup>
61+
</xct:Popup>

samples/XCT.Sample/Pages/Views/Popups/NoLightDismissPopup.xaml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,10 @@
33
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
44
xmlns:xct="http://xamarin.com/schemas/2020/toolkit"
55
xmlns:local="clr-namespace:Xamarin.CommunityToolkit.Sample.Pages.Views.Popups"
6+
Size="{x:Static local:PopupSize.Medium}"
67
IsLightDismissEnabled="False"
78
x:Class="Xamarin.CommunityToolkit.Sample.Pages.Views.Popups.NoLightDismissPopup">
89

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-
1910
<xct:Popup.Resources>
2011
<ResourceDictionary>
2112
<Style x:Key="Title" TargetType="Label">
@@ -57,4 +48,4 @@
5748
Clicked="Button_Clicked" />
5849
</StackLayout>
5950

60-
</xct:Popup>
51+
</xct:Popup>

samples/XCT.Sample/Pages/Views/Popups/OpenedEventSimplePopup.xaml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,9 @@
33
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
44
xmlns:xct="http://xamarin.com/schemas/2020/toolkit"
55
xmlns:local="clr-namespace:Xamarin.CommunityToolkit.Sample.Pages.Views.Popups"
6+
Size="{x:Static local:PopupSize.Medium}"
67
x:Class="Xamarin.CommunityToolkit.Sample.Pages.Views.Popups.OpenedEventSimplePopup">
78

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-
189
<xct:Popup.Resources>
1910
<ResourceDictionary>
2011
<Style x:Key="Title" TargetType="Label">
@@ -47,4 +38,4 @@
4738
Style="{StaticResource Content}" />
4839
</StackLayout>
4940

50-
</xct:Popup>
41+
</xct:Popup>
Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1-
using Xamarin.Forms;
1+
using Xamarin.Essentials;
2+
using Xamarin.Forms;
23

34
namespace Xamarin.CommunityToolkit.Sample.Pages.Views.Popups
45
{
56
static class PopupSize
67
{
7-
public static Size Android => new Size(1000, 1200);
8+
// examples for fixed sizes
9+
public static Size Tiny => new Size(100, 100);
810

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));
1217
}
1318
}

samples/XCT.Sample/Pages/Views/Popups/ReturnResultPopup.xaml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,10 @@
33
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
44
xmlns:xct="http://xamarin.com/schemas/2020/toolkit"
55
xmlns:local="clr-namespace:Xamarin.CommunityToolkit.Sample.Pages.Views.Popups"
6+
Size="{x:Static local:PopupSize.Medium}"
67
x:Class="Xamarin.CommunityToolkit.Sample.Pages.Views.Popups.ReturnResultPopup"
78
x:TypeArguments="x:String">
89

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-
1910
<xct:Popup.Resources>
2011
<ResourceDictionary>
2112
<Style x:Key="Title" TargetType="Label">
@@ -54,4 +45,4 @@
5445
Clicked="Button_Clicked" />
5546
</StackLayout>
5647

57-
</xct:Popup>
48+
</xct:Popup>

samples/XCT.Sample/Pages/Views/Popups/SimplePopup.xaml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,9 @@
33
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
44
xmlns:xct="http://xamarin.com/schemas/2020/toolkit"
55
xmlns:local="clr-namespace:Xamarin.CommunityToolkit.Sample.Pages.Views.Popups"
6+
Size="{x:Static local:PopupSize.Small}"
67
x:Class="Xamarin.CommunityToolkit.Sample.Pages.Views.Popups.SimplePopup">
78

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-
189
<xct:Popup.Resources>
1910
<ResourceDictionary>
2011
<Style x:Key="Title" TargetType="Label">
@@ -47,4 +38,4 @@
4738
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." />
4839
</StackLayout>
4940

50-
</xct:Popup>
41+
</xct:Popup>

samples/XCT.Sample/Pages/Views/Popups/ToggleSizePopup.xaml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,9 @@
33
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
44
xmlns:xct="http://xamarin.com/schemas/2020/toolkit"
55
xmlns:local="clr-namespace:Xamarin.CommunityToolkit.Sample.Pages.Views.Popups"
6+
Size="{x:Static local:PopupSize.Medium}"
67
x:Class="Xamarin.CommunityToolkit.Sample.Pages.Views.Popups.ToggleSizePopup">
78

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-
189
<xct:Popup.Resources>
1910
<ResourceDictionary>
2011
<Style x:Key="Title" TargetType="Label">
@@ -53,4 +44,4 @@
5344
Clicked="Button_Clicked" />
5445
</StackLayout>
5546

56-
</xct:Popup>
47+
</xct:Popup>

0 commit comments

Comments
 (0)