Click here to Skip to main content
12,690,904 members (33,529 online)
Rate this:
Please Sign up or sign in to vote.
Hi All,

I need to make a textbox control visible in one of my silverlight screens based on the selection done in 1st screen.

I'm using MVVM. How to make textbox control visible in 3rd screen based on the state selected in 1st screen.
For eg., the requirement is like, If I select NewYork in my first screen, based on this entry, I need to collapse the textbox visibility in 3rd screen if state is newyork.

Please help on this by providing your suggestions.

Posted 24-Jul-12 0:08am

1 solution

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

Solution 1

Quickly I have two ideas.
The first one correspond to a Silverlight page:
You can add a parameter in your querystring (on your first screen page) in your silverlight application. In the other Page you get the value of the querystring variable.

The second solution, if you use usercontrol, is more simple:
You need to pass the parameter (city for eg.) of the first screen, inside the constructor of the second screen.

public SecondScreen(int cityID)

   //Do something with the cityID

Hope it helps. :)
Kranthi Boppana 25-Jul-12 3:22am
Thanks for your reply
I couldn't get focus on constructors for Viewmodels or Xaml.cs files.These constructors triggers only while loading silverlight app. so I cannot access Querystring value
Christian Amado 25-Jul-12 6:48am
How do you navigate on your application? Between pages or between usercontrols? Just to clarify the situation.

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 | Mobile
Web01 | 2.8.170117.1 | Last Updated 24 Jul 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

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