나는 특정 페이지 시작 라이브 제목을 사용라이브 제목은 무한 루프로 전환
홈 화면에서라이브 타일 --launch -> P2 - - 작업 및 고토 후> P1> MainPage
을메인 페이지에서 뒤로 버튼을 클릭하면 앱이 종료되지 않고 루프 방식으로 P2로 이동합니다. > P1 (PageTakePic.xaml) - -> P2 -> MainPage
홈 화면에서라이브 타일 --launch :
try
{
ShellTile TileToFind = ShellTile.ActiveTiles.FirstOrDefault(x => x.NavigationUri.ToString().Contains("PageTakePic.xaml"));
if (TileToFind == null)
{
StandardTileData NewTileData = new StandardTileData
{
//BackgroundImage = new Uri("Red.jpg", UriKind.Relative),
//--front tile
Title = "Take Pic",
//Count = 12,
BackTitle = "Quick Access",
//--40 char
BackContent = "Take Pic",
//BackBackgroundImage = new Uri("Blue.jpg", UriKind.Relative)
};
// Create the Tile and pin it to Start. This will cause a navigation to Start and a deactivation of our application.
ShellTile.Create(new Uri("/PageTakePic.xaml", UriKind.Relative), NewTileData);
}
else
{
MessageBox.Show("A live title created for this service already.");
}
}
catch (Exception ex)
{
MessageBox.Show("Try again. Error encountered: " + ex.Message);
NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative));
}
업데이트 : 여기
코드입니다아래의 방법을 사용하면 MainPage에서 작동하지 않습니다. 당신이 얻을 - 어떤 점에서 다시 탐색 할 때
NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative));
를 그 다음이 가능 :
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
base.OnNavigatedTo(e);
NavigationService.RemoveBackEntry();
}
다른 곳이 될 것입니다 문제처럼 보인다 .. 당신이 PageTakePic로 이동하여 MainPage에 어떤 곳이 있습니까? 나는 어딘가에 당신이 탐색 해야하는지 결정하기 위해 사용하는 변수를 설정하고있는 것 같아요. –