-
-
Notifications
You must be signed in to change notification settings - Fork 20
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 #9 from muak/survey/8
Nested dialogs #8
- Loading branch information
Showing
12 changed files
with
116 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
## files generated by popular Visual Studio add-ons. | ||
|
||
.vs/ | ||
mono_crash.* | ||
|
||
# User-specific files | ||
*.suo | ||
|
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
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,26 @@ | ||
using System; | ||
using AiForms.Dialogs.Abstractions; | ||
using Prism.Mvvm; | ||
using Reactive.Bindings; | ||
using Sample.Views; | ||
using Sample.Views.Dialogs; | ||
|
||
namespace Sample.ViewModels | ||
{ | ||
public class SurveyPageViewModel:BindableBase | ||
{ | ||
public ReactiveCommand ShowDialogCommand { get; } = new ReactiveCommand(); | ||
public SurveyPageViewModel() | ||
{ | ||
var dialog = AiForms.Dialogs.Dialog.Instance; | ||
ShowDialogCommand.Subscribe(async _ => | ||
{ | ||
var ret = await dialog.ShowAsync<TestDialog>(); | ||
if (ret) | ||
{ | ||
//await dialog.ShowAsync<DialogTestView>(); | ||
} | ||
}); | ||
} | ||
} | ||
} |
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,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<extra:DialogView | ||
xmlns="http://xamarin.com/schemas/2014/forms" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
xmlns:extra="clr-namespace:AiForms.Dialogs.Abstractions;assembly=AiForms.Dialogs.Abstractions" | ||
x:Class="Sample.Views.Dialogs.TestDialog"> | ||
|
||
<Button Text="OK" Clicked="Button_Clicked" /> | ||
|
||
</extra:DialogView> |
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,33 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Threading.Tasks; | ||
using AiForms.Dialogs.Abstractions; | ||
using Xamarin.Forms; | ||
|
||
namespace Sample.Views.Dialogs | ||
{ | ||
public partial class TestDialog : DialogView | ||
{ | ||
public TestDialog() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
void Button_Clicked(System.Object sender, System.EventArgs e) | ||
{ | ||
Device.BeginInvokeOnMainThread(() => | ||
{ | ||
//(this.Parent as Page).DisplayAlert("", "Hoge","OK"); | ||
//(this.Parent as Page).DisplayAlert("", "Fuga", "OK"); | ||
AiForms.Dialogs.Dialog.Instance.ShowAsync<DialogTestView>(); | ||
}); | ||
//DialogNotifier.Complete(); | ||
|
||
} | ||
|
||
public override void Destroy() | ||
{ | ||
|
||
} | ||
} | ||
} |
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,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ContentPage | ||
xmlns="http://xamarin.com/schemas/2014/forms" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
x:Class="Sample.Views.SurveyPage"> | ||
<Button Text="Show" Command="{Binding ShowDialogCommand}" /> | ||
</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,15 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
using Xamarin.Forms; | ||
|
||
namespace Sample.Views | ||
{ | ||
public partial class SurveyPage : ContentPage | ||
{ | ||
public SurveyPage() | ||
{ | ||
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