views:

47

answers:

1

I'm trying to create a site that requires login. Its entirely designed in silverlight. So my first page, home.xaml loads in mysite.aspx and it basically has a login page. AFter login, the user is redirected to another page user.aspx. in that page, i've embedded another silverlight control called nav.xaml.

so now when user.aspx loads it is supposed to load a silverlight control. i've programmed app.xaml.vb such that it loads nav.xaml in the rootlayout when the page requesting is user.aspx. but for some reason its not working. my app.xaml.vb code:

 Private Sub Application_Startup(ByVal o As Object, ByVal e As StartupEventArgs) Handles Me.Startup
        If e.InitParams.ContainsKey("ReqPage") Then
            If e.InitParams("ReqPage") = "userpage" Then
                Me.RootVisual = New Nav()
            End If
        Else
            Me.RootVisual = New Home()
        End If
    End Sub

in IE, half of the nav.xaml is rendered. but in firefox nothing is rendered. so wats going on exactly? pls help!

A: 

got the solution. the control's height property is set to 0 when its set as "100%". i dont know may be something is screwed when it tries to automatically size. Got around it by manually specifying the height of the silverlight control in px.

<div id="silverlightControlHost" style="height:700px">
    <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">

notice the height attribute in the div tag. now its working both in IE and firefox.

Azmath