Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/306.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows8辅助磁贴导航c#_C#_Windows 8_Windows Runtime_Microsoft Metro_Windows Store Apps - Fatal编程技术网

Windows8辅助磁贴导航c#

Windows8辅助磁贴导航c#,c#,windows-8,windows-runtime,microsoft-metro,windows-store-apps,C#,Windows 8,Windows Runtime,Microsoft Metro,Windows Store Apps,我正在我的应用程序中使用辅助磁贴,所有这些都可以正常工作,但不幸的是,当我从辅助磁贴启动应用程序时,它会打开启动屏幕,我已经搜索过,我知道我必须编辑我的应用程序。cs需要捕获tileActivationArguments,但我不知道如何正确执行。 求你了,我需要你的帮助 谢谢 这是我用来锁定密码的代码 private async void btnpin_Click_1(object sender, RoutedEventArgs e) { //mantenmos abierta el a

我正在我的应用程序中使用辅助磁贴,所有这些都可以正常工作,但不幸的是,当我从辅助磁贴启动应用程序时,它会打开启动屏幕,我已经搜索过,我知道我必须编辑我的应用程序。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));
}

您的代码是正确的,我认为
args.Arguments
中会有问题,如果条件可能由于参数不正确而无法满足。

您的代码是正确的,我认为
args.Arguments
中会有问题,
if
条件可能由于错误参数而无法满足。谢谢@Xyroid我已经解决了我的问题。欢迎:)我将我的评论作为答案发布,请接受它作为答案并投票。