Creates a node reference.
public void Execute(PluginCommandParameter parameter)
{
var rootPage = studio.ActiveProject.GetProjectItem("Screens/Screen/RootPage");
var introPage = studio.ActiveProject.CreateProjectItem<Page>(rootPage.GenerateUniqueChildName("Intro"), rootPage);
rootPage.Set(Properties.PageHostDefaultSubPage.Name, "Intro");
var mainPage = studio.ActiveProject.CreateProjectItem<Page>(rootPage.GenerateUniqueChildName("Main"), rootPage);
var pageActivatedTrigger =
introPage.Triggers.First(
trigger => trigger.Get(Properties.TriggerMessageType) == studio.ActiveProject.MessageTypeLibrary.GetItemByName("Message.Page.Activated"));
var navigateToPageAction = pageActivatedTrigger.CreateAction(studio.ActiveProject.TriggerActionTypeLibrary.GetItemByName("Kanzi.DispatchMessageAction"));
navigateToPageAction.DispatchMessageActionMessageType = studio.ActiveProject.MessageTypeLibrary.GetItemByName("Message.Page.Navigate");
ProjectItemReference<ExportedPropertyContainerItem> routingTarget = new NodeReference<Page>(mainPage);
navigateToPageAction.RoutingTarget = routingTarget;
navigateToPageAction.Delay = 2000;
}