Created
August 27, 2018 12:52
-
-
Save QiMata/477f121dd5d80c9b92cf69ecd9237984 to your computer and use it in GitHub Desktop.
Code Snippet for Team
This file contains hidden or 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
class ChildViewModel | |
{ | |
//some properties | |
} |
This file contains hidden or 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
class ParentView : ContentPage | |
{ | |
private ChildViewModel _child; | |
public void ShowChild() | |
{ | |
if (_child == null) | |
{ | |
_child = new ChildViewModel(); | |
} | |
var childPage = new ContentPage | |
{ | |
BindingContext = _child; | |
}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment