FullScreen via Keystroke

In theFullScreen documentation it says that:

"A WPF/E control can only enable full-screen mode in response to a set of user-initiated actions. These actions correspond to theMouseLeftButtonDown,MouseLeftButtonUp,KeyDown, andKeyUp events. "

However, the KeyDown and KeyUp events don't seem to be able to trigger full screen mode. To test this I have the following javascript:

var wpfe;

function loaded(sender, args)
{
wpfe = document.getElementById("wpfeControl1");
}

function onMouseLeftButtonUp(sender, eventArgs)
{
// Toggle between embedded mode and full-screen mode.
wpfe.fullScreen = !wpfe.fullScreen;
}


function keyDown(sender, eventArgs)
{
// Toggle between embedded mode and full-screen mode.
wpfe.fullScreen = !wpfe.fullScreen;
}

With the following Xaml:

<Canvas xmlns="http://schemas.microsoft.com/client/2007"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Loaded=loaded"
MouseLeftButtonUp=onMouseLeftButtonUp"
KeyDown=keyDown"
>

<Rectangle Width="300" Height="200" Fill="Red" />

</Canvas>

Clicking on the block with the mouse puts it into full screen, but you can press any key you want and it does nothing. I switched the events to KeyUp and MouseDown and I get the same results.

Are the docs incorrect or is this a bug?

[2274 byte] By [BryantLikes] at [2007-12-31]
# 1
This fullscreen feature is interesting, but I can't make it work.

I tried to put "control.fullScreen = true" on all of the javascript and xaml events, onmousedown, onmouseup, onkeydown, onkeyup, onleftmousedown, etc... it doesn't work. Neither in IE nor in Firefox

Do you know, if fullscreen can be triggered only by XAML events, or can I use classic javascript events? Until Februar CTP there were no XAML key events, so I used only javascript events onkeydown, onkeyup, onkeypress.

presslessness at 2007-9-6 > top of Msdn Tech,Silverlight (formerly WPF/E),Silverlight (formerly WPF/E) Developer Issues...
# 2

Is the keyboard event is being raised correctly, or could that be the issue here?

Thanks,
Ed Maia
WPF/E PM

EdMaiaMSFT at 2007-9-6 > top of Msdn Tech,Silverlight (formerly WPF/E),Silverlight (formerly WPF/E) Developer Issues...
# 3

The keyboard event works and it even sets the FullScreen property to true. I tried adding an alert before setting the property:

alert(wpfe1.FullScreen);

It switches between true and false even though it doesn't seem to get set.

BryantLikes at 2007-9-6 > top of Msdn Tech,Silverlight (formerly WPF/E),Silverlight (formerly WPF/E) Developer Issues...
# 4
Ok, I found the problem, i wrote "fullScreen" instead of "FullScreen". Not it does change into full screen.

But, I cannot make it work in Firefox 1.5, and in IE, events don't work in full screen mode. In fact, most of my events are standard javascript events, so probably that is the reason, but I also use OnLeftMouseDown XAML event, and it still doesn't fire in fullscreen.

When will fullscreen be supported in Firefox and should this property work also with javascript events, or it is limited only to XAML events?

presslessness at 2007-9-6 > top of Msdn Tech,Silverlight (formerly WPF/E),Silverlight (formerly WPF/E) Developer Issues...
# 5
Events fire for me in fullscreen mode just fine. I have drag and drop as welll as buttons with rollovers working. All above in IE.
nooneimportant at 2007-9-6 > top of Msdn Tech,Silverlight (formerly WPF/E),Silverlight (formerly WPF/E) Developer Issues...
# 6

Bryant, what platform/browser are you working on?

Presslessness, if you could send a repro of what is not working, that would be great.

Thanks a lot,
Ed Maia
WPF/E Program Manager

EdMaiaMSFT at 2007-9-6 > top of Msdn Tech,Silverlight (formerly WPF/E),Silverlight (formerly WPF/E) Developer Issues...
# 7

BTW, we got an internal repro of this bug and it will be fixed in the next public CTP.

Thanks again for reporting this issue.

Ed Maia
WPF/E PM

EdMaiaMSFT at 2007-9-6 > top of Msdn Tech,Silverlight (formerly WPF/E),Silverlight (formerly WPF/E) Developer Issues...