Make a clickable menu using longlist selector [closed] - c#

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I want to make a list of a menu and I want it to be clickable. When a user taps on it, it will change page (to another XAML). I am a beginner in Windows Phone programming, so, as now, I only use selectionChanged, but it only works for 1 string of the list.
So lets say I want to make a list of home, login, forum in the menu, I only could use selectionChanged for the first one.
I have searched for a solution over and over again on every site, but none of the sites share a full tutorial to make it.
If anybody knows how to make it, please help.

This has been discussed multiple times on StackOverflow. What you're trying to achieve is to get some data associated with the LongListSelector's item been tapped. That data lives in the DataContext property of the item. When you handle the Tap event on the list item, you can retrieve your item's DataContext, cast it to required type, and use it as you wish, for example to navigate to some specific page, or whatever you want to achieve.
See this answer as an exampe.

you should check the templated application that are provided with the sdk.
Create a new project of type Databound App.

Related

About ListBox limit item [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
Hello everyone,I am new here, can I ask a question:
Let's say I have a ListBox (with more than 5k items of all English words ). and a richTextBox.
And a ListBox usually load every items, right? How can I change my ListBox to just load/pick a few (maybe 10 items) from the data?
EXAMPLE:
**When a user type a word, I dont want my ListBox to load every thing starting with the word my user input. I just want my ListBox to load just a few item.(More to like a word prediction software) **
Please give an answer that is not too complicated, since I am a beginner.
Thanks, Teik Fai.
From your question, it looks like you need to implement virtualization on the listbox.
You can either use a VirtualizingStackPanel inside a Listbox as ItemsPanel Template or you use - ItemsControl and set its property VirtualizingStackPanel.IsVirtualizing="True"
This should help.

C# - best way of creating a program with multiple forms/windows? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Here's what I'm trying to do:
I have a main form and I added a UserControl named menu to it. Here's how it looks:
http://prntscr.com/a5dx0e
Now what I want is: when I select an item from the menu, the content below the menu will change without loading another form.
I could do that but the user would see a window disappearing and another appearing and that's kinda ugly.
What I really want is to replace the content based on the menu item clicked.
The best way I found was to create multiple UserControls and then just replace them with the right one. Is this a good idea or are there any better solutions?
Please note that I'm a starter in C# and I'm looking for the easiest solution.
Use the tab control and hide the tab header. Control the navigation amongst the pages programmatically when user clicks a menu. I've used this technique successfully in the past.
Choices,
hide/reveal panels (ways to collect/group all of the controls you are hiding revealing now)
Use a multi-tab control
Use an MDI (multi document interface) control
Use multiple forms, but display the new one first, then hide the prior one.

How can I add an intro to a Windows Phone application? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I want to add a good welcome intro to my Windows Phone Application, like the Dropbox's one.The welcome's pages are very simple, I mean there will be just come text and image, and in the last one the user will be required to register or to login. What kind of layout/tecniques is possible to use ? This welcome intro should be display only if it is the first time, that the user opens the application, or if he hasn't registered to the service. I think the easiest way is to save same variable in the settings preferences memory, isn't it ? Thank you in advance for your suggestion !
UPDATE
What I'm looking for it is to create a welcome pages which describe to the user what the application does. The layout I'm looking for it is very similar to the Dropbox's one, which has some points at the end of the pages.
Quite a broad question, there are many ways on how to approach this. I would do it like this
Create a IsLoggedIn method on my data service
In App.xaml.cs, check if the user is logged in, if yes, launch with the main page, if not launch with the intro page
In the intro page, I would use a FlipView. I would add one fake item at the end of the FlipView and redirect to the main page if the user flips to it.

Make scrollable dynamic list of objects in Windows form [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I would like to make a simple Windows Form application which displays a list of persons. This list is dynamic (coming from a webservice).
For example, assume we have the class Person with the properties id, age, name and email. My code will make a request to my webservice and retrieve
List<Person> list = ...;
In my GUI, I would like to show the person in a table-like, scrollable structure (each row is a person). It is important to me that I can design the rows by myself and not use some boring basic list with text only. For example, there should be a contact button in every row in order to contact a person by its email. Or one column could contain a user image etc.
Question
What is the common way to do that? Would you use a table layout panel? Are there some good tutorials out there to show the workflow of my setup?
Is there a way to design one row in the Visual Studio Designer and dynamically generate the others from that pattern?
I would appreciate some tips.
I think a DataGridView is what you're looking for. You can add buttons, checkboxes, ect... It is table like, and can be sorted if needed.

Display info on page by list and or title altered by toggle button [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I am not sure what to look for or how to look for examples for this so any assistance will be greatly appreciated.
I have a view page that displays a list of users by their name and then little icons for email - picture - profile page.
I want to create a toggle button on the page that will change the display page for the users and display them by the user picture and then little icons for email and profile.
Are there any examples with this feature?
I am using asp.net mvc4 c# VS2012. Thanks
If you have a controller that provides getting people data, then simplest way to reach your goal is to create two different views (one with display list of users by their name and another with display by user picture). Then toggle button may be just the html link to another view.

Categories