Advanced Forum Search Results
-
Yes, you can. It involves using javascript to call a silverlight method. Check out this blog:
http://blogs.vertigo.com/personal/ralph/Blog/archive/2008/05/15/call-silverlight-from-javascript-call-javascript-from-silverlight.aspx
Even if it's for beta 2, it gets the point across.
-
Hello,
I'm unable to test this code at the moment, but have you tried:
VisualStateManager.GoToState(this, "Normal", true);
Also, you may try using false as the last parameter. As I said, unable to test, so unsure if either of these will help you.
-Lewis
-
Also, what are the return types of both calls? Bool, int, some complex object?
-
Is the first call to the webservice passing/returning a some primative data type(s) and the second call using some complex data type? If so, there may be some sort of serialization error.
-
Can you paste some example code of what you've tried?
Thanks
-Lewis
-
Good to know! I even read the thread on the ContentControl bug, and thought it may be related, but wasn't terribly sure. Thanks for the reply!
-Lewis
-
Hello,
I've come across this since updating our website to Beta2. Occasionally, when our app loads, IE will show a script error, and a blank page. This error is:
Sys.InvalidOperationException: ManagedRuntimeError error #4004 in control 'SilverlightControl': System.NullReferenceException: Object reference not set to an ...
-
In your selectionChanged event handler, check the type of the selected item before casting. In C# I would do:
if (lb.SelectedItem is ListBoxItem)
{
//Cast to ListBoxItem then set txt1.Text (Do what you have posted)
}
else if (lb.SelectedItem is String)
txt1.Text = lb.SelectedItem
Again, sorry I don't know VB syntax.
-
As far as I know, there is no direct print from Silverlight. My solution is to create another page, passing data/parameters to the page, and calling it a "Print View" page.
-
Oops, I write everything in c#, so obviously so does everyone else... right?
I'm unsure of the syntax in vb.net. But you need to cast lstbox.SelectedItem to a ListBoxItem, then access the Content property, calling ToString on it.