-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from AvantiPoint/dev/ds/dialogs
Adding Dialog Demo
- Loading branch information
Showing
22 changed files
with
165 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"recommendations": [ | ||
"ms-dotnettools.dotnet-maui" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": ".NET MAUI", | ||
"type": "maui", | ||
"request": "launch", | ||
"preLaunchTask": "maui: Build" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"cSpell.words": [ | ||
"autowire", | ||
"Mvvm" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<Project> | ||
<ItemGroup> | ||
<PackageVersion Include="Microsoft.Maui.Controls" Version="8.0.3" Condition="$(IsPackable) == 'true'"/> | ||
<PackageVersion Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" Condition="$(IsPackable) != 'true'"/> | ||
<PackageVersion Include="ReactiveUI" Version="19.5.39" /> | ||
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" /> | ||
<PackageVersion Include="Refit" Version="7.0.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.6.133" /> | ||
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?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" | ||
x:Class="MauiMicroSample.Pages.DialogDemo" | ||
xmlns:micro="http://schemas.mauimicromvvm.com/2022/dotnet/maui" | ||
xmlns:vm="clr-namespace:MauiMicroSample.ViewModels" | ||
micro:MauiMicro.Autowire="True" | ||
x:DataType="vm:DialogDemoViewModel" | ||
Title="Dialog Demo"> | ||
<VerticalStackLayout Spacing="5" | ||
Padding="10"> | ||
<Label Text="Dialog Demo" Style="{DynamicResource Title}" /> | ||
<Button Text="Display Alert" Command="{Binding ShowAlertCommand}" /> | ||
<Button Text="Display ActionSheet" Command="{Binding ShowActionSheetCommand}" /> | ||
</VerticalStackLayout> | ||
</ContentPage> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace MauiMicroSample.Pages; | ||
|
||
public partial class DialogDemo : ContentPage | ||
{ | ||
public DialogDemo() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
namespace MauiMicroSample.Pages | ||
namespace MauiMicroSample.Pages; | ||
|
||
public partial class MainPage : ContentPage | ||
{ | ||
public partial class MainPage : ContentPage | ||
public MainPage() | ||
{ | ||
public MainPage() | ||
{ | ||
InitializeComponent(); | ||
} | ||
InitializeComponent(); | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System.Windows.Input; | ||
using MauiMicroMvvm; | ||
|
||
namespace MauiMicroSample.ViewModels; | ||
|
||
public class DialogDemoViewModel : MauiMicroViewModel | ||
{ | ||
public DialogDemoViewModel(ViewModelContext context) | ||
: base(context) | ||
{ | ||
ShowActionSheetCommand = new Command(async () => { | ||
await context.PageDialogs.DisplayActionSheet("Sample Action Sheet", "Cancel", "Destroy", "Button 1", "Button 2"); | ||
}); | ||
|
||
ShowAlertCommand = new Command(async () => { | ||
await context.PageDialogs.DisplayAlert("Sample Alert", "This is a sample alert", "Accept", "Cancel"); | ||
}); | ||
} | ||
|
||
public ICommand ShowAlertCommand { get; } | ||
|
||
public ICommand ShowActionSheetCommand { get; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
src/MauiMicroMvvm.Templates/content/MauiMicroApp.1/.vscode/extensions.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"recommendations": [ | ||
"ms-dotnettools.dotnet-maui" | ||
] | ||
} |
14 changes: 14 additions & 0 deletions
14
src/MauiMicroMvvm.Templates/content/MauiMicroApp.1/.vscode/launch.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": ".NET MAUI", | ||
"type": "maui", | ||
"request": "launch", | ||
"preLaunchTask": "maui: Build" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters