Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8479935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:10:18+00:00 2026-06-10T19:10:18+00:00

I have a basic RSS reader that displays the list of Blog posts in

  • 0

I have a basic RSS reader that displays the list of Blog posts in a listView in the left Grid.Column. In the Right Grid.Column is the WebView. When the user selects an item in the listView, the Webview is updated with Uri and displays the web page.

Now, I’ve added a BottomAppBar and created Pin/UnPin buttons. I’ve successfully created the pinning ability, however, I am not passing any data into the NavigationContext’s query string. So when the user clicks on the pinned tile, it only deeplinks to the overall page and not the selected article. This loads all the latest articles and not the selected item’s url.

I know I have to pass the Url into the pinned tile’s querystring, but I’m stuck here. I’ve done this dozens of time in my Windows Phone apps, but I’m stuck here for this Windows 8 app. On WP7, I am using a context menu to pin the item. Here I am pinning from the appbar and I can’t seem to get the url and add it as a querystring (As my TileActivationArgument)

Mainly I need guidance with how to get the selected item’s data and get it onto the tile and how to read it coming back in. Here is my Pin() method:

EDIT: I’ve gone ahead and made a temporary working solution, but it doesn’t solve my issue of not being able to retrieve the selected item’s properties. Comments are inline w/the code

private async void PinTileHelper(string message, object sender)
    {
        //This is my preferred method, but I cannot extract the SelectedItem's properties
        //var item = itemListView.SelectedItem;


        //I'm not able to use the sender because this is a button click
        //var selectedItem = (FeedItems)((ListView)sender).SelectedItem;

        //As a cheesy workaround, I just took the Uri directly from the WebView's source Uri
        var ActivationArgument = this.ContentView.Source.ToString();

        Uri logo = new Uri("ms-appx:///Assets/squareTile-sdk.png");
        //Uri smallLogo = new Uri("ms-appx:///Assets/smallTile-sdk.png");

        SecondaryTile secondaryTile = new SecondaryTile("Toolbox",
                                                        "Fantasy Football Tile",
                                                        "Article name goes here and ",
                                                        ActivationArgument,
                                                        TileOptions.ShowNameOnLogo,
                                                        logo);

        secondaryTile.ForegroundText = ForegroundText.Dark;
        //secondaryTile.SmallLogo = smallLogo;

        bool isPinned = await secondaryTile.RequestCreateAsync();

        MessageDialog dialog = new MessageDialog("Pinned?");

        if (isPinned)
        {
            dialog.Content = "You have succesfully pinned this tile";
            await dialog.ShowAsync();
        }
        else
        {
            dialog.Content = "Something went wrong. The tile wasn't pinned.";
            await dialog.ShowAsync();
        }
    }

Thanks for any insight you can provide.

EDIT #2: Success!! Safe casting to your ItemViewModel items does the trick.

var item = itemListView.SelectedItem as FeedItems (or your ItemViewModel items);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T19:10:20+00:00Added an answer on June 10, 2026 at 7:10 pm

    Try replacing

    var selectedItem = (FeedItems)((ListView)sender).SelectedItem;
    

    with

    var selectedItem = (FeedItems)((ListView)sender).SelectedItem as FeedItem;
    

    I’m assuming that is the correct class Type for the as statement. This will let you access all of the properties, including Uri, on the selected item. If selectedItem is null after this call, you are not casting to the right Type. Cast to the appropriate class type. Right now, with the code as is, you are getting a plain old object back.

    Yes, you grab the LaunchArgs and pass them on to your destination page as part of handling your start navigation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a strange problem with my webview. I have a basic webview that
I have a basic RSS Reader I made from three20 tutorials using TTLauncherView as
I had made a basic rss reader that reads the feed and display it
I am building a basic RSS reader app that, which the 'story' is clicked,
I have a basic web service that returns the following object as JSON: public
I have basic issue that i don't understand, we use HEAT to consume directory
I have basic stored procedure that performs a full text search against 3 columns
I'm making a basic RSS reader and it should be opening the link in
I have basic JavaScript code that needs to tell how many names out of
I have a basic XML document setup like this: <rss> <channel> </channel> </rss> I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.