How do I tell if the browser window is Maximized in Silverlight/C#?
The "Form" maximize feature will not work because I am writing a silverlight app that runs in the browser.
I have tried this:
App.Current.Host.Content.FullScreenChanged += new EventHandler(Content_FullScreenChanged);
but this event handler is not called when I maximize the window.
Maximized is not full screen
App.Current.Host.Content.IsFullScreen;
returns false even if I maximize the window.
Loading


Priya LingeRank #785 · 2.9K reputationPosted Jul 15, 2011, 12:45 AM EDT
We can get size of browser by Resized Event in Silverlight .When its maximize we can capture that position by this event.
App.Current.Host.Content.Resized +=new EventHandler(Content_Resized);
Void Content_Resized(object sender,RoutedEventArgs e)
{
double height = App.Current.Host.Content.ActualHeight;
double width = App.Current.Host.Content.ActualWidth;
}
Thanks.
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Jul 15, 2011, 3:59 AM EDT
Minimize and resize is different thing right...
Priya LingeRank #785 · 2.9K reputationPosted Jul 15, 2011, 4:39 AM EDT
I didn't get any event to find whether window is minimized, but i am trying to find the position of window in minimized state.
Thanks.
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Jul 15, 2011, 4:48 AM EDT
But we cant find if it is Silverlight OOB Application.
Priya LingeRank #785 · 2.9K reputationPosted Jul 15, 2011, 5:07 AM EDT
Application.Current.MainWindow.WindowState=WindowState.Minimized.
right jaganathan.
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Jul 16, 2011, 10:42 PM EDT