0

アプリでセカンダリ タイルを使用していますが、すべて正常に動作しますが、残念ながらセカンダリ タイルからアプリケーションを起動するとスタート画面が開きます。検索したところ、App.cs を編集して tileActivationArguments をキャッチする必要があることがわかりましたしかし、私はそれを正しく行う方法がわかりません。あなたの助けが必要ですありがとう。

固定に使用するコードは次のとおりです

private async void btnpin_Click_1(object sender, RoutedEventArgs e)
{
    //mantenmos abierta el appbar
    this.miappbar.IsSticky = true;

    //obtenemos la imagen del .json y la mostramos en la nota
    Uri logo = new Uri(pequeniaImagen);
    Uri smalllogo = new Uri(pequeniaImagen);

    //creamos el secondary tile
    SecondaryTile secondary = new SecondaryTile(logoSecondaryTileld, String.Format("{0} {1:d}",pageTitle.Text,Convert.ToDateTime(tvFecha.Text)),pageTitle.Text,logoSecondaryTileld, TileOptions.ShowNameOnLogo,logo);

    secondary.DisplayName =pageTitle.Text;//nombre de la nota

    //obtenemos el color de fondo del secondary tile
    SolidColorBrush brush= Editor.returnColorfromString(Mcolor);
    secondary.BackgroundColor = brush.Color;

    //color del texto
    secondary.ForegroundText = ForegroundText.Dark;

    bool isPinned = await secondary.RequestCreateForSelectionAsync(detalles.GetElementRect((FrameworkElement)sender), Windows.UI.Popups.Placement.Below);
    //el usuario pinieo la nota

    if (isPinned)
    {
        //ocultamos el btn pin
        btnpin.Visibility = Visibility.Collapsed;

        //mostramos el btn unpin
        btnunpin.Visibility = Visibility.Visible;
    }

    this.miappbar.IsSticky = false;
}

これは私のApp.csコードです

if (rootFrame.Content == null)
{
    if (!String.IsNullOrEmpty(args.Arguments))
        rootFrame.Navigate(typeof(detalles), args.Arguments);  
    else
        rootFrame.Navigate(typeof(GroupedItemsPage));
}
else    
{
    if (!String.IsNullOrEmpty(args.Arguments))
        rootFrame.Navigate(typeof(detalles), args.Arguments);
    else
        rootFrame.Navigate(typeof(GroupedItemsPage));
}
4

1 に答える 1