Skip to main content

Microsoft Silverlight

Answered Question Is there anyway to control if the host browser window has status bar, url bar, etcRSS Feed

(0)

sinosoidal
sinosoidal

Member

Member

664 points

373 Posts

Is there anyway to control if the host browser window has status bar, url bar, etc

Hi,

I want to launch my app in a new window without any bars around. Just the border of the window.

How can I do that?

Thx,

Nuno
 

--

Imagining (and touching) the future
http://www.nunosantos.net/
http://www.myspace.com/sinosoidal

mzzlpik
mzzlpik

Member

Member

35 points

13 Posts

Re: Is there anyway to control if the host browser window has status bar, url bar, etc

It is possible to launch full screen:

http://weblogs.asp.net/scottgu/archive/2007/05/17/tip-trick-supporting-full-screen-mode-with-silverlight.aspx

 

sinosoidal
sinosoidal

Member

Member

664 points

373 Posts

Re: Is there anyway to control if the host browser window has status bar, url bar, etc

Hi,

Have you made it in SL 2?

Application.Current.Host.Content.IsFullScreen = true;

I tried that line above and nothing!

Thx, 

Nuno 

--

Imagining (and touching) the future
http://www.nunosantos.net/
http://www.myspace.com/sinosoidal

mzzlpik
mzzlpik

Member

Member

35 points

13 Posts

Re: Is there anyway to control if the host browser window has status bar, url bar, etc

hmm, i havent.

Maybe it doesnt work in SL2 :(

nmpgaspar
nmpgaspar

Member

Member

174 points

109 Posts

Re: Is there anyway to control if the host browser window has status bar, url bar, etc

I had the same issue.

that has to be an event:

void Page_KeyDown(object sender, KeyEventArgs e)

{

// go full screen when F is pressed (esc will take us out of full screen)

if (e.Key == Key.F)

{

content.IsFullScreen =
true;

}

}

Putting it on the page constructor won't work, for some reason - security from what i've read.

Cheers braga-boy!

sladapter
sladapter

All-Star

All-Star

17439 points

3,172 Posts

Answered Question

Re: Is there anyway to control if the host browser window has status bar, url bar, etc

see this demo: 

http://www.mscui.net/PatientJourneyDemonstrator/


Your make your default.htmp page to have a Launch button. When clicked you open another browser window without any bars(use Javascript window.open function) to launch your Silverlight app.

If you want make the default.html page also siverlight control page with silverlight button:

on button_click: 

 HtmlPage.Window.Navigate(new Uri(AppStartPageUrl), "_blank", "toolbar=no,location=no,status=no,menubar=no,resizable=yes"); 

 

sladapter
Software Engineer
Aprimo, Inc

Please remember to mark the replies as answers if they answered your question

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities