Skip to content

Commit

Permalink
Bringing touch-effect up to date with main (#1383)
Browse files Browse the repository at this point in the history
* Popup v6 windows (#1086)

Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com>
Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>
Co-authored-by: Shaun Lawrence <shaunrlawrence@gmail.com>

* ♻️ [Housekeeping] Fixed  GravatarImageSourceTests.TestDefaultStream (#1335)

* [housekeeping] Automated PR to fix formatting errors (#1327)

* Fix popup margin on iOS (#1329)

* Bump NuGet.Protocol from 6.6.1 to 6.7.0 in /samples (#1330)

* Use fully qualified namespace for Color reference in TextToColorGenerator (#1332)

* Use fully qualified namespace for Color reference in TextToColorGenerator to prevent collisions

This change should prevent "ambiguous reference" error to occur when other packages are included in a MAUI project that provide their own Color objects

* added global prefix to be safer

---------

Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>
Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com>

* Code cleanup and preparation for the next release (breaking changes) (#1324)

* Code cleanup and preparation for .net 8

* Update CompareConverter.shared.cs

* Revert global.json

* More CleanUps

* Remove redundant TrySetCanceled and rely on speech recognition result

* Update Formatting

---------

Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com>

* Fix Gestures on Popup on ios (#1342)

* Fix Gestures on Popup on ios

* don't query type cast directly

* Code for AddLogicalChild (.NET 8)

* reduce changes

* setting the parent fixes the BindingContext of the view

* Revert "setting the parent fixes the BindingContext of the view"

This reverts commit 0a64b56.

* reduce changes

* simplify code

* fixing build

* assigned Element to contentPage.Parent

---------

Co-authored-by: pedrojesus <pedrojesus.cefet@gmail.com>

* `global.json`: Change `"rollForward": "latestMajor",` -> `"rollForward": "latestFeature"`. (#1338)

Update global.json

* Bump Microsoft.NET.Test.Sdk from 17.7.0 to 17.7.1 in /samples (#1348)

Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.7.0 to 17.7.1.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md)
- [Commits](microsoft/vstest@v17.7.0...v17.7.1)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* 632 bug avatar view clipping on windows (#1344)

* Resolves issue on Windows where the splash screen icon is not found.

* Resolves an issue with the 'Ratings' sample for AvatarView.

* Spaces and not tabs

* Spaces and not tabs

* Changed MauiImage to point to Images folder.

* Changed splash for Windows to be Resize=False

* Typo in name of MauiImage

* Try to prevent locking.

* Bump Microsoft.CodeAnalysis from 4.6.0 to 4.7.0 in /samples (#1355)

* Bump Microsoft.CodeAnalysis.CSharp.Workspaces from 4.6.0 to 4.7.0 in /samples (#1357)

* Bump FluentAssertions from 6.11.0 to 6.12.0 in /samples (#1365)

* fix  IconTintColorBehavior  for Windows (#1370)

fix  IconTintColorBehavior  for windows

Co-authored-by: Oleksii <sokol@managed-code.com>

* Add `MemoryAnalyzer` roslyn analyzer (#1371)

* Add NuGet Package + Update `WarningsAsErrors`

* Fix MA0002

* Fix `MauiDrawingView`

* Fix `MauiPopup`

* Fix Naming

* return `null` for nullable references

* Use Ternary Operator

* `dotnet format`

* iOS popup fix with Shell or TabbedPage (#1343)

* Fix Issue #1256


Better fix

* Fixed Popup on Multiple Level Pages (#822)

---------

Co-authored-by: Vladislav Antonyuk <33021114+VladislavAntonyuk@users.noreply.github.com>
Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com>

* [housekeeping] Automated PR to fix formatting errors (#1373)

* Bump Microsoft.NET.Test.Sdk from 17.7.1 to 17.7.2 in /samples (#1378)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Vladislav Antonyuk <33021114+VladislavAntonyuk@users.noreply.github.com>
Co-authored-by: Brandon Minnick <13558917+brminnick@users.noreply.github.com>
Co-authored-by: Pedro Jesus <pedrojesus.cefet@gmail.com>
Co-authored-by: Shaun Lawrence <shaunrlawrence@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: cat0363 <125236133+cat0363@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wolf <132034537+wolfgang-ironsoftware@users.noreply.github.com>
Co-authored-by: Thomas Stocker <thomas.stocker@gmail.com>
Co-authored-by: George Leithead <github@internetwideworld.com>
Co-authored-by: Sokol2001 <53799292+Sokol2001@users.noreply.github.com>
Co-authored-by: Oleksii <sokol@managed-code.com>
Co-authored-by: Andrey Onishchenko <100789522+cucumber-sp@users.noreply.github.com>
  • Loading branch information
14 people committed Sep 4, 2023
1 parent d69d0b3 commit 8d93867
Show file tree
Hide file tree
Showing 60 changed files with 479 additions and 606 deletions.
7 changes: 5 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,16 @@ Please see our [Code of Conduct](https://dotnetfoundation.org/code-of-conduct).

As should be clear by now: we assume everyone tries to do their best, everyone should be treated with respect and equally.

In the unfortunate event that doesn't happen, please feel free to report it to any of the team members or reach out to [Gerald](maillo:gerald.versluis@microsoft.com) directly.
In the unfortunate event that doesn't happen, please feel free to report it to any of the team members or reach out to [Gerald](mailto:gerald.versluis@microsoft.com) directly.

We will take appropriate actions and measures if necessary.

## Prerequisites

You will need to complete a Contribution License Agreement before any pull request can be accepted. Complete the CLA at https://cla.dotnetfoundation.org/. This will also be triggered whenever you open a PR and the link should guide you through it.
1. Install latest stable [.NET SDK](https://dotnet.microsoft.com/en-us/download)
1. Install .NET MAUI workloads (we recommend using Visual Studio installer)

> You will need to complete a Contribution License Agreement before any pull request can be accepted. Complete the CLA at https://cla.dotnetfoundation.org/. This will also be triggered whenever you open a PR and the link should guide you through it.
## Reporting a bug

Expand Down
8 changes: 6 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Project>
<PropertyGroup>
<NetVersion>net7.0</NetVersion>
<!-- Fixes https://github.com/dotnet/maui/pull/12114 -->
<PublishReadyToRun>false</PublishReadyToRun>
<LangVersion>latest</LangVersion>
Expand All @@ -26,8 +27,11 @@
CS1592: Badly formed XML in included comments file
CS1598: XML parser could not be loaded. The XML documentation file will not be generated.
CS1658: Identifier expected; 'true' is a keyword
CS1734: XML comment has a paramref tag, but there is no parameter by that name -->
<WarningsAsErrors>nullable,CS0419,CS1570,CS1571,CS1572,CS1573,CS1574,CS1580,CS1581,CS1584,CS1589,CS1590,CS1592,CS1598,CS1658,CS1734</WarningsAsErrors>
CS1734: XML comment has a paramref tag, but there is no parameter by that name
MA0001: Don't define public events in NSObject subclasses
MA0002: Don't declare members in NSObject subclasses unless they are WeakReference, WeakReference<T>, or Value types
MA0003: Don't subscribe to events inside NSObject subclasses unless it's your event (via this.MyEvent) or inherited from a base type, or the method is static -->
<WarningsAsErrors>nullable,CS0419,CS1570,CS1571,CS1572,CS1573,CS1574,CS1580,CS1581,CS1584,CS1589,CS1590,CS1592,CS1598,CS1658,CS1734,MA0001,MA0002,MA0003</WarningsAsErrors>
</PropertyGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<Project>
<ItemGroup Condition="$(TargetFramework.StartsWith('Xamarin.iOS')) != true AND $(TargetFramework.StartsWith('net7.0-ios')) != true">
<ItemGroup Condition="$(TargetFramework.StartsWith('Xamarin.iOS')) != true AND $(TargetFramework.StartsWith('$(NetVersion)-ios')) != true">
<Compile Remove="**\**\*.ios.cs" />
<None Include="**\**\*.ios.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
<Compile Remove="**\ios\**\*.cs" />
<None Include="**\ios\**\*.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('Xamarin.Mac')) != true AND $(TargetFramework.StartsWith('net7.0-maccatalyst')) != true">
<ItemGroup Condition="$(TargetFramework.StartsWith('Xamarin.Mac')) != true AND $(TargetFramework.StartsWith('$(NetVersion)-maccatalyst')) != true">
<Compile Remove="**\*.macos.cs" />
<None Include="**\*.macos.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
<Compile Remove="**\macos\**\*.cs" />
<None Include="**\macos\**\*.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('Xamarin.Mac')) != true AND $(TargetFramework.StartsWith('Xamarin.iOS')) != true AND $(TargetFramework.StartsWith('net7.0-ios')) != true AND $(TargetFramework.StartsWith('net7.0-maccatalyst')) != true">
<ItemGroup Condition="$(TargetFramework.StartsWith('Xamarin.Mac')) != true AND $(TargetFramework.StartsWith('Xamarin.iOS')) != true AND $(TargetFramework.StartsWith('$(NetVersion)-ios')) != true AND $(TargetFramework.StartsWith('$(NetVersion)-maccatalyst')) != true">
<Compile Remove="**\*.macios.cs" />
<None Include="**\*.macios.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
<Compile Remove="**\macios\**\*.cs" />
<None Include="**\macios\**\*.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('MonoAndroid')) != true AND $(TargetFramework.StartsWith('net7.0-android')) != true ">
<ItemGroup Condition="$(TargetFramework.StartsWith('MonoAndroid')) != true AND $(TargetFramework.StartsWith('$(NetVersion)-android')) != true ">
<Compile Remove="**\**\*.android.cs" />
<None Include="**\**\*.android.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
<Compile Remove="**\android\**\*.cs" />
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"sdk": {
"version": "7.0.200",
"rollForward": "latestMajor",
"rollForward": "latestFeature",
"allowPrerelease": false
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0-ios;net7.0-android;net7.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks Condition="'$(IncludeTizenTargetFrameworks)' == 'true'">$(TargetFrameworks);net7.0-tizen</TargetFrameworks>
<TargetFrameworks>$(NetVersion)-ios;$(NetVersion)-android;$(NetVersion)-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);$(NetVersion)-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks Condition="'$(IncludeTizenTargetFrameworks)' == 'true'">$(TargetFrameworks);$(NetVersion)-tizen</TargetFrameworks>
<OutputType>Exe</OutputType>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
Expand Down Expand Up @@ -42,14 +42,15 @@

<!-- Images -->
<MauiImage Include="Resources\Images\*" />
<MauiImage Update="Resources\Images\splash.svg" BaseSize="128,128" Color="#512BD4" Resize="false" />

<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />

<EmbeddedResource Include="Resources\Embedded\*" />

<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />
<MauiFont Include="Resources\Fonts\*" />

<PackageReference Include="CommunityToolkit.Maui.Markup" Version="3.2.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.1" />
Expand Down Expand Up @@ -83,4 +84,4 @@
<RuntimeIdentifiers>maccatalyst-arm64;maccatalyst-x64</RuntimeIdentifiers>
</PropertyGroup>

</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<Picker
Grid.Row="2"
ItemsSource="{Binding Locales}"
SelectedItem="{Binding Locale}"
SelectedItem="{Binding CurrentLocale}"
ItemDisplayBinding="{Binding ., Converter={StaticResource PickerLocaleDisplayConverter}}"
Margin="0,0,0,20">
</Picker>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@
</Setter>
<Setter Property="FontSize" Value="Default" />
<Setter Property="TextColor" Value="Silver" />
<Setter Property="WidthRequest" Value="48" />
<Setter Property="HeightRequest" Value="48" />
</Style>
</ResourceDictionary>
</VerticalStackLayout.Resources>
Expand All @@ -66,39 +64,39 @@
Grid.Column="0"
HeightRequest="48"
SemanticProperties.Description="Sample AvatarView idea using a polyline stroke shape to override the corder radius to draw a star."
StrokeShape="Polyline 70,16 76,32 94,32 80,44 84,60 70,50 55,60 60,42 46,32 64,32"
StrokeShape="Polyline 24,0 29,16 48,18 34,30 38,48 24,37 10,48 14,30 0,18 19,16"
Style="{StaticResource Rating}"
Text="1"
WidthRequest="48" />
<mct:AvatarView
Grid.Column="1"
HeightRequest="48"
SemanticProperties.Description="Sample AvatarView idea using a polyline stroke shape to override the corder radius to draw a star."
StrokeShape="Polyline 70,16 76,32 94,32 80,44 84,60 70,50 55,60 60,42 46,32 64,32"
StrokeShape="Polyline 24,0 29,16 48,18 34,30 38,48 24,37 10,48 14,30 0,18 19,16"
Style="{StaticResource Rating}"
Text="2"
WidthRequest="48" />
<mct:AvatarView
Grid.Column="2"
HeightRequest="48"
SemanticProperties.Description="Sample AvatarView idea using a polyline stroke shape to override the corder radius to draw a star."
StrokeShape="Polyline 70,16 76,32 94,32 80,44 84,60 70,50 55,60 60,42 46,32 64,32"
StrokeShape="Polyline 24,0 29,16 48,18 34,30 38,48 24,37 10,48 14,30 0,18 19,16"
Style="{StaticResource Rating}"
Text="3"
WidthRequest="48" />
<mct:AvatarView
Grid.Column="3"
HeightRequest="48"
SemanticProperties.Description="Sample AvatarView idea using a polyline stroke shape to override the corder radius to draw a star."
StrokeShape="Polyline 70,16 76,32 94,32 80,44 84,60 70,50 55,60 60,42 46,32 64,32"
StrokeShape="Polyline 24,0 29,16 48,18 34,30 38,48 24,37 10,48 14,30 0,18 19,16"
Style="{StaticResource Rating}"
Text="4"
WidthRequest="48" />
<mct:AvatarView
Grid.Column="4"
HeightRequest="48"
SemanticProperties.Description="Sample AvatarView idea using a polyline stroke shape to override the corder radius to draw a star, cliped by parent size."
StrokeShape="Polyline 70,16 76,32 94,32 80,44 84,60 70,50 55,60 60,42 46,32 64,32"
StrokeShape="Polyline 24,0 29,16 48,18 34,30 38,48 24,37 10,48 14,30 0,18 19,16"
Style="{StaticResource Rating}"
Text="5"
WidthRequest="48">
Expand All @@ -112,7 +110,7 @@
HeightRequest="48"
ImageSource="avatar_icon.png"
SemanticProperties.Description="Sample AvatarView idea using a polyline stroke shape to override the corder radius to draw a star."
StrokeShape="Polyline 70,16 76,32 94,32 80,44 84,60 70,50 55,60 60,42 46,32 64,32"
StrokeShape="Polyline 24,0 29,16 48,18 34,30 38,48 24,37 10,48 14,30 0,18 19,16"
Style="{StaticResource Rating}"
Text="1"
WidthRequest="48" />
Expand All @@ -122,7 +120,7 @@
HeightRequest="48"
ImageSource="https://aka.ms/campus.jpg"
SemanticProperties.Description="Sample AvatarView idea using a polyline stroke shape to override the corder radius to draw a star."
StrokeShape="Polyline 70,16 76,32 94,32 80,44 84,60 70,50 55,60 60,42 46,32 64,32"
StrokeShape="Polyline 24,0 29,16 48,18 34,30 38,48 24,37 10,48 14,30 0,18 19,16"
Style="{StaticResource Rating}"
Text="2"
WidthRequest="48" />
Expand All @@ -132,7 +130,7 @@
HeightRequest="48"
ImageSource="avatar_icon.png"
SemanticProperties.Description="Sample AvatarView idea using a polyline stroke shape to override the corder radius to draw a star, cliped by parent size."
StrokeShape="Polyline 70,16 76,32 94,32 80,44 84,60 70,50 55,60 60,42 46,32 64,32"
StrokeShape="Polyline 24,0 29,16 48,18 34,30 38,48 24,37 10,48 14,30 0,18 19,16"
Style="{StaticResource Rating}"
Text="3"
WidthRequest="48">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,21 @@
<ResourceDictionary>
<Style x:Key="Header"
TargetType="Label">
<Setter Property="VerticalOptions" Value="CenterAndExpand" />
<Setter Property="HorizontalOptions" Value="CenterAndExpand" />
<Setter Property="VerticalOptions" Value="Center" />
<Setter Property="HorizontalOptions" Value="Center" />
<Setter Property="Margin" Value="15, 10" />
</Style>
<Style TargetType="ScrollView">
<Setter Property="VerticalOptions" Value="FillAndExpand" />
</Style>
<Style x:Key="ItemsLayout"
TargetType="StackLayout">
<Setter Property="Spacing" Value="16" />
<Setter Property="VerticalOptions" Value="Fill" />
</Style>
</ResourceDictionary>
</ContentPage.Resources>

<ScrollView>
<Grid ColumnDefinitions="Auto, Auto, Auto"
HorizontalOptions="CenterAndExpand"
HorizontalOptions="Center"
RowDefinitions="Auto, Auto, Auto, Auto"
VerticalOptions="CenterAndExpand">
VerticalOptions="Center">

<Label Grid.Row="0"
Grid.ColumnSpan="3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ public partial class ShowPopupInOnAppearingPage : BasePage<ShowPopupInOnAppearin

protected override async void OnAppearing()
{

// Proves that we now support showing a popup before the platform is even ready.
var result = await this.ShowPopupAsync(new ReturnResultPopup(popupSizeConstants));
await this.ShowPopupAsync(new ReturnResultPopup(popupSizeConstants));
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using CommunityToolkit.Mvvm.ComponentModel;
using System.Diagnostics;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Microsoft.Maui.Dispatching;

Expand Down Expand Up @@ -58,7 +59,7 @@ async Task DownloadDotNetBotImage()
}
catch (Exception e)
{
Console.WriteLine(e);
Trace.WriteLine(e);
OnImageDownloadFailed(e.Message);
}
finally
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public partial class SpeechToTextViewModel : BaseViewModel
readonly ISpeechToText speechToText;

[ObservableProperty]
Locale? locale;
Locale? currentLocale;

[ObservableProperty]
string? recognitionText = "Welcome to .NET MAUI Community Toolkit!";
Expand All @@ -45,15 +45,15 @@ async Task SetLocales()
Locales.Add(locale);
}

Locale = Locales.FirstOrDefault(x => x.Language is defaultLanguage or defaultLanguage_android or defaultLanguage_tizen) ?? Locales.FirstOrDefault();
CurrentLocale = Locales.FirstOrDefault(x => x.Language is defaultLanguage or defaultLanguage_android or defaultLanguage_tizen) ?? Locales.FirstOrDefault();
}

[RelayCommand]
async Task Play(CancellationToken cancellationToken)
{
await textToSpeech.SpeakAsync(RecognitionText ?? "Welcome to .NET MAUI Community Toolkit!", new()
{
Locale = Locale,
Locale = CurrentLocale,
Pitch = 2,
Volume = 1
}, cancellationToken);
Expand All @@ -74,7 +74,7 @@ async Task Listen(CancellationToken cancellationToken)
RecognitionText = beginSpeakingPrompt;

var recognitionResult = await speechToText.ListenAsync(
CultureInfo.GetCultureInfo(Locale?.Language ?? defaultLanguage),
CultureInfo.GetCultureInfo(CurrentLocale?.Language ?? defaultLanguage),
new Progress<string>(partialText =>
{
if (RecognitionText is beginSpeakingPrompt)
Expand Down Expand Up @@ -102,6 +102,6 @@ async Task Listen(CancellationToken cancellationToken)

void HandleLocalesCollectionChanged(object? sender, NotifyCollectionChangedEventArgs e)
{
OnPropertyChanged(nameof(Locale));
OnPropertyChanged(nameof(CurrentLocale));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,10 @@ public sealed partial class PopupAnchorViewModel : BaseViewModel
[RelayCommand]
static void ShowPopup(View anchor)
{

// Using the C# version of Popup until this get fixed
// https://github.com/dotnet/maui/issues/4300

// This works

var popup = new TransparentPopupCSharp()
{
Anchor = anchor
};

// This doesn't work

//var popup = new TransparentPopup
//{
// Anchor = anchor
//};

Page.ShowPopup(popup);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ public sealed partial class XamlBindingPopupViewModel : BaseViewModel
{
public string Title { get; } = "Xaml Binding Popup";

public string Message { get; } = "This is a platform specific popup with a .NET MAUI View being rendered. The behaviors of the popup will confirm to 100% as each platform implementation look and feel, but still allows you to use your .NET MAUI Controls.";
public string Message { get; } = "This is a platform specific popup with a .NET MAUI View being rendered.\nThe behaviors of the popup will confirm to 100% as each platform implementation look and feel, but still allows you to use your .NET MAUI Controls.";
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@


<Label x:Name="Title"
Style="{StaticResource Title}" />
Style="{StaticResource Title}"
Text="This Title Is About To Change"/>
<BoxView Style="{StaticResource Divider}" />
<Label x:Name="Message"
Text="This sample changes the title and message in Popup's OnAppearing method"
Style="{StaticResource Content}" />
</VerticalStackLayout>
</mct:Popup>

0 comments on commit 8d93867

Please sign in to comment.