I have a full blown .Net 3.5 business application that now requires a CoverFlow control. Does anyone have a working code example of embedding the Silverlight CoverFlow control into a .Net 3.5 web application? An example where clicking on the CoverFlow will return the index back to the web application is what I am looking for.
Thanks,
Rick
Thanks,
Rick
3 Answers, 1 is accepted
0
Hello Rick,
Here is a quick example of this functionality. In the easiest scenario, you know the name of the html element that you want to send the value to, so when the SelectionChanged event fires on RadCoverFlow it sends that index to the control. The code for that is pretty straightforward once you get used to interacting with the DOM from Silverlight:
*(the input box on the aspx page has an ID of Input).
This was built with the Q3 Beta 1 dlls, but the concept is the same going back to Silverlight 2. I've attached the project so you can check it out and use it as an example to get you started.
Best wishes,
Evan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Here is a quick example of this functionality. In the easiest scenario, you know the name of the html element that you want to send the value to, so when the SelectionChanged event fires on RadCoverFlow it sends that index to the control. The code for that is pretty straightforward once you get used to interacting with the DOM from Silverlight:
private void xCoverFlow_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
HtmlDocument htmlDoc = HtmlPage.Document;
HtmlElement htmlElement = htmlDoc.GetElementById("Input");
htmlElement.SetAttribute("value", xCoverFlow.SelectedIndex.ToString());
}
This was built with the Q3 Beta 1 dlls, but the concept is the same going back to Silverlight 2. I've attached the project so you can check it out and use it as an example to get you started.
Best wishes,
Evan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Rick
Top achievements
Rank 1
answered on 24 Oct 2009, 12:59 PM
That is awesome thank you. Now my intent is to set a selected row in a GridView using the index from the Silverlight object.
My question now is: How do I do this the other way around. I have selected a row in my GridView and I want to use the Index value to choose an index in my Silverlight coverflow.
My question now is: How do I do this the other way around. I have selected a row in my GridView and I want to use the Index value to choose an index in my Silverlight coverflow.
0
Hi Rick,
Sorry for the delayed response, the Q3 release and events schedule has been hectic but I didn't want you to think we forgot about you.
In order to do this, you would cover operations through calling a HtmlPage.Window.Invoke to send data back to the client through pre-defined Javascript functions, and when the client index changes you are able to call the Silverlight plugin by identifying the plugin, calling into a ScriptableMember in our Silverlight code, and letting that handle the change in the plugin.
Check out the attached project and let me know if you have any other questions.
Regards,
Evan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Sorry for the delayed response, the Q3 release and events schedule has been hectic but I didn't want you to think we forgot about you.
In order to do this, you would cover operations through calling a HtmlPage.Window.Invoke to send data back to the client through pre-defined Javascript functions, and when the client index changes you are able to call the Silverlight plugin by identifying the plugin, calling into a ScriptableMember in our Silverlight code, and letting that handle the change in the plugin.
Check out the attached project and let me know if you have any other questions.
Regards,
Evan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.