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

  • SEARCH
  • Home
  • 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 7308325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T23:32:31+00:00 2026-05-28T23:32:31+00:00

How do i create an event for it to detect that the user tapped

  • 0

How do i create an event for it to detect that the user tapped on the item in listbox

<!--Pivot Control-->
<controls:Pivot Title="MY APPLICATION">
    <!--Pivot item one-->
    <controls:PivotItem Header="item1">
        <ListBox x:Name="lbFiles" HorizontalContentAlignment="Stretch" ItemTemplate="{StaticResource DataTemplate1}">
        </ListBox>
    </controls:PivotItem>
    <!--Pivot item two-->
    <controls:PivotItem Header="item2">
    </controls:PivotItem>
</controls:Pivot>

Code behind

 private void lbFile_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {

            selected = lbFiles.SelectedItem.ToString();
            general item = new general();
            item.viewimage(selected);
            NavigationService.Navigate(new Uri("/View.xaml", UriKind.Relative));
        }

headache THanks! 😀

  • 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-05-28T23:32:32+00:00Added an answer on May 28, 2026 at 11:32 pm

    You’re not attaching the SelectionChanged event. You have a function for it there, but you’re not making anything use it.

    <ListBox x:Name="lbFiles" HorizontalContentAlignment="Stretch" SelectionChanged="lbfile_SelectionChanged" ItemTemplate="{StaticResource DataTemplate1}">
            </ListBox>
    

    You need to attach events so that they are used. You should go through the first few WP7 tutorials on create.msdn – you’ll find a lot of what you need to get started and feel more comfortable about things like this.

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

Sidebar

Related Questions

Answerers: How does one literally detect the user's font scale, so that it may
I recently discovered that I can use lambdas to create simple event handlers. I
To create a new event handler on a control you can do this c.Click
How do I create a C# event handler that can be handled in IronPython?
I would like to create an application for Windows that is visible in the
Can I create an event so I can execute some javascript whenever an element
I want to create an Event Calendar for my iPhone App. In a first
I am trying to create new Event objects to be persisted in the database
IN VB.NET (not c#)... I want to create an event than can be canceled
Anyone know how to create a routed event in Silverlight 2? In WPF, the

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.