Click here to Skip to main content
15,868,154 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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.

Thanks
Posted

1 solution

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.

C#
public SecondScreen(int cityID)
{
   InitializeComponent();

   //Do something with the cityID
   ...
}

Hope it helps. :)
 
Share this answer
 
Comments
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)



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