Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello :-)

I hope you can help me out again.

So I´m about to writing a WinRT App with C# and XAML.
Let me make an example what it should doing:

We see 3 Labels, 3 Textboxes and a Addbutton:
Name | Surname | Birthday
TB1 | TB2 | TB3 | Addbutton

Now I type in my Informations as usally. By Clicking the Addbutton the App should take the given informations, append a new line to the Grid and write the given informations in it.

I get really stucked here...could any one please give me advises how to realise it?!

thanks a lot!
Posted

1 solution

Alex - the approach I would take would be to use an ObservableCollection that holds a collection of the class you are using to wrap the name, surname and birthday in. This collection will be the ItemsSource in your GridView - when you add an item to it, the application will automatically display the new element.
 
Share this answer
 
Comments
Alex Großmann 11-Feb-13 8:49am    
Thank you a lot Pete. This sounds very complicated....So I have to create a class with a lot of getters and setters?
Pete O'Hanlon 11-Feb-13 8:53am    
It's not complicated at all - it's something called MVVM. Have a read of this article to get an idea: http://msdn.microsoft.com/en-us/magazine/dd419663.aspx
Alex Großmann 12-Feb-13 15:25pm    
It worked! Thank you so much :-)
Pete O'Hanlon 12-Feb-13 15:26pm    
You're welcome Alex. I'm glad to have been able to help.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900