I have a main silverlight control named MainPage.xaml in an asp.net web site.
I want to dynamically add and remove control at run time.
So,
I have created another control Top10.xaml and added to selected canvas area on MainPage.xaml as described on this page(Click Me):
Now i need to modify Top10 visibility in MainPage.xaml dynamically when a button is clicked on MainPage.xaml using C# code in MainPage.xaml.cs.
Can anybody help me out?
Thanks
for programmability you might wanna set an id for the control u declare in xaml.
you could say x:Name=”top10″ or something similar.
on the click event of the button you could use the code below
Hope this helps.