mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Resolved Issue #1242: Add Page showingModally event.
This commit is contained in:
@@ -3,9 +3,15 @@ import TKUnit = require("../../TKUnit");
|
||||
import frame = require("ui/frame");
|
||||
import page = require("ui/page");
|
||||
|
||||
var modalPage: page.Page;
|
||||
|
||||
export function onShowingModally(args) {
|
||||
modalPage = <page.Page>args.object;
|
||||
}
|
||||
|
||||
export function onShownModally(args: ShownModallyData) {
|
||||
TKUnit.assertNotNull(modalPage);
|
||||
TKUnit.wait(0.100);
|
||||
var modalPage = <page.Page>args.object;
|
||||
if (args.context) {
|
||||
args.context.shownModally = true;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<Page shownModally="onShownModally">
|
||||
<Page showingModally="onShowingModally" shownModally="onShownModally">
|
||||
<StackLayout>
|
||||
<Label text="Modal Page" />
|
||||
</StackLayout>
|
||||
|
||||
Reference in New Issue
Block a user