views:

172

answers:

2

I want to prompt the user to use the Open Stream api. When I call showPermissionDialog, the code executes fine, but nothing pops up. I know you can't put HTML in a Silverlight app, but the popup should show up on top of the Silverlight app. Is this possible? If so, how?

Thanks.

A: 

Put

   <param name="windowless" value="true"/>

into your Silverlight object tag and then use CSS Z order to position.

You can use a negative z order for the Silverlight object and the div it's in. Michael

Michael S. Scherotter
I specified that and addedstyle="z-index:0; position:fixed; top:0; left:0"to the <object> tag, but it still doesn't work. What am I missing?
Dan Friedman
Did you specify a greater z index for the permission dialog?How are you calling the showPermissionDialog (via JS, via SL)?Are you getting any error messages?
Michael S. Scherotter
A: 

(Note: I didn't register for the initial post so now I can't figure out how to reply, so I created this account.)

Here's my code:

In MainPage.xaml.cs:

((HtmlPage.Window.GetProperty("FB") as ScriptObject)
    .GetProperty("Connect") as ScriptObject)
    .Invoke("showPermissionDialog", "publish_stream");

I also tried

HtmlPage.Window.Invoke("ShowFBPermissionsDialog"); (in MainPage.xaml.cs)

with

<script type="text/javascript">
    function ShowFBPermissionsDialog() {
        FB.Connect.showPermissionDialog("publish_stream");
    }
</script>

in Site.master.

I don't know how to set a Z-index on the permissions dialog since that is generated by Facebook.

There are no error messages.

Thanks.

Dan Friedman
if you replace FB.Connect.showPermissionDialog("publish_stream"); with alert("publish"); does a message box show up?
Michael S. Scherotter
Yes the message box does show up.
Dan Friedman