Select to view content in your preferred language

Detecting fullsize screen

850
4
05-18-2010 01:23 PM
DonFreeman
Emerging Contributor
The sample map toolbar includes a button to switch the browser to full screen mode. The user presses ESC to return to normal view. Is there a way to detect this return to normal view so some of the features can be adjusted or turned off at that time?

Thanks
0 Kudos
4 Replies
DanielWalton
Frequent Contributor
0 Kudos
dotMorten_esri
Esri Notable Contributor
This event is fired whenever the fullscreen state is toggled:
    Application.Current.Host.Content.FullScreenChanged
0 Kudos
DonFreeman
Emerging Contributor
Thanks Dan. Your sample will detect the state but that's not what I need. What I need is to detect that the state has changed. (a trigger) The link you provided seems to discuss this but I can't make much sense of it. Do you have a sample of how to trigger an event when the state changes?
Thanks
0 Kudos
DonFreeman
Emerging Contributor
I found it. Here it is.
 Private Sub MainPage_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded
   AddHandler App.Current.Host.Content.FullScreenChanged, AddressOf fullScreenChanged
 End Sub

 Private Sub fullScreenChanged()
  If Not App.Current.Host.Content.IsFullScreen Then
   Logo.Visibility = Visibility.Collapsed
  End If
 End Sub
0 Kudos