Skip to content

Commit e583137

Browse files
committed
More fixes
1 parent b3029d9 commit e583137

File tree

11 files changed

+39
-39
lines changed

11 files changed

+39
-39
lines changed

sample/Sample/Pages/ProgressPage.xaml

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
33
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
4-
xmlns:local="clr-namespace=Samples.ViewModels"
4+
xmlns:local="clr-namespace:Samples.ViewModels"
5+
x:DataType="local:ProgressViewModel"
56
x:Class="Samples.ProgressPage"
67
Title="Progress">
78
<ContentPage.Content>
89
<ListView ItemsSource="{Binding Commands}">
910
<ListView.ItemTemplate>
10-
<DataTemplate>
11-
<TextCell Text="{Binding Text}" Command="{Binding Command}" />
11+
<DataTemplate x:DataType="local:CommandViewModel">
12+
<TextCell Text="{Binding Text}"
13+
Command="{Binding Command}" />
1214
</DataTemplate>
1315
</ListView.ItemTemplate>
1416
</ListView>

sample/Sample/Pages/SettingsPage.xaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
33
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
4-
xmlns:local="clr-namespace=Samples.ViewModels"
4+
xmlns:local="clr-namespace:Samples.ViewModels"
5+
x:DataType="local:SettingsViewModel"
56
x:Class="Samples.SettingsPage"
67
Title="Settings/Themes">
78
<ContentPage.Content>
8-
<StackLayout>
9+
<VerticalStackLayout>
910
<Button Text="Load Standard Theme" Command="{Binding StandardSettings}" />
1011
<Button Text="Load Funny Theme" Command="{Binding LoadAbnormalSettings}" />
11-
</StackLayout>
12+
</VerticalStackLayout>
1213
</ContentPage.Content>
1314
</ContentPage>

sample/Sample/Pages/SpecificCasesPage.xaml

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
33
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
4-
xmlns:local="clr-namespace=Samples.ViewModels"
4+
xmlns:local="clr-namespace:Samples.ViewModels"
5+
x:DataType="local:SpecificCasesViewModel"
56
x:Class="Samples.SpecificCasesPage"
67
Title="Specific Cases">
78
<ContentPage.Content>
89
<CollectionView ItemsSource="{Binding Commands}">
910
<CollectionView.ItemTemplate>
10-
<DataTemplate>
11-
<Button Text="{Binding Text}" Command="{Binding Command}" />
11+
<DataTemplate x:DataType="local:CommandViewModel">
12+
<Button Text="{Binding Text}"
13+
Command="{Binding Command}" />
1214
</DataTemplate>
1315
</CollectionView.ItemTemplate>
1416
</CollectionView>

sample/Sample/Pages/StandardPage.xaml

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,25 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
33
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
4-
xmlns:local="clr-namespace=Samples.ViewModels"
4+
xmlns:local="clr-namespace:Samples.ViewModels"
5+
x:DataType="local:StandardViewModel"
56
x:Class="Samples.StandardPage"
67
Title="Standard Dialogs">
78
<ContentPage.Content>
8-
<StackLayout>
9-
<StackLayout Orientation="Horizontal">
9+
<VerticalStackLayout>
10+
<HorizontalStackLayout>
1011
<Switch IsToggled="{Binding AutoCancel}" />
1112
<Label Text="Cancel After 3 Seconds" />
12-
</StackLayout>
13+
</HorizontalStackLayout>
14+
1315
<ListView ItemsSource="{Binding Commands}">
1416
<ListView.ItemTemplate>
15-
<DataTemplate>
16-
<TextCell Text="{Binding Text}" Command="{Binding Command}" />
17+
<DataTemplate x:DataType="local:CommandViewModel">
18+
<TextCell Text="{Binding Text}"
19+
Command="{Binding Command}" />
1720
</DataTemplate>
1821
</ListView.ItemTemplate>
1922
</ListView>
20-
</StackLayout>
23+
</VerticalStackLayout>
2124
</ContentPage.Content>
2225
</ContentPage>

sample/Sample/Pages/ToastsPage.xaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
33
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
4-
xmlns:local="clr-namespace=Samples.ViewModels"
4+
xmlns:local="clr-namespace:Samples.ViewModels"
5+
x:DataType="local:ToastsViewModel"
56
x:Class="Samples.ToastsPage"
67
Title="Toasts">
78
<ContentPage.Content>
1.4 KB
Loading

sample/Sample/Resources/Raw/AboutAssets.txt

-15
This file was deleted.

sample/Sample/Sample.csproj

+9-1
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,26 @@
2525
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
2626
</PropertyGroup>
2727

28+
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-ios|AnyCPU'">
29+
<CreatePackage>false</CreatePackage>
30+
</PropertyGroup>
2831
<ItemGroup>
2932
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
3033

3134
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />
3235

3336
<MauiImage Include="Resources\Images\*" />
3437
<MauiFont Include="Resources\Fonts\*" />
35-
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
3638
</ItemGroup>
3739

3840
<ItemGroup>
3941
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.14" />
4042
<ProjectReference Include="..\..\src\Acr.UserDialogs\Acr.UserDialogs.csproj" />
4143
</ItemGroup>
44+
<ItemGroup>
45+
<None Remove="Resources\Raw\" />
46+
</ItemGroup>
47+
<ItemGroup>
48+
<Folder Include="Resources\Raw\" />
49+
</ItemGroup>
4250
</Project>

sample/Sample/ViewModels/ProgressViewModel.cs

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Threading;
4-
using System.Threading.Tasks;
5-
using System.Windows.Input;
1+
using System.Windows.Input;
62
using Acr.UserDialogs;
73

84

src/Acr.UserDialogs/Platforms/ios/TTGSnackbar.cs

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using UIKit;
44

55

6-
76
namespace TTG
87
{
98
public enum TTGSnackbarAnimationType

src/Acr.UserDialogs/Platforms/ios/UserDialogsImpl.cs

+3
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,9 @@ protected virtual void AddActionSheetOption(ActionSheetOption opt, UIAlertContro
252252
if (opt.ItemIcon != null)
253253
{
254254
var icon = UIImage.FromBundle(opt.ItemIcon);
255+
if (icon == null)
256+
throw new InvalidOperationException("Invalid Icon Name: " + opt.ItemIcon);
257+
255258
alertAction.SetValueForKey(icon, new NSString("image"));
256259
}
257260
controller.AddAction(alertAction);

0 commit comments

Comments
 (0)