Click here to Skip to main content
13,595,908 members
Rate this:
Please Sign up or sign in to vote.
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 11-Feb-13 1:06am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.
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:
Pete O'Hanlon 12-Feb-13 15:26pm
You're welcome Alex. I'm glad to have been able to help.
Alex Großmann 12-Feb-13 15:25pm
It worked! Thank you so much :-)

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web02 | 2.8.180621.3 | Last Updated 11 Feb 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100