Hi,
i want to display silverlight page as full screen ie out of browser. for that i use one line of code . but is working fine in button click . But i want to make it out work in page load. if use that line in same under button click event it is showing that page as full screen . but i want when i click on the button of one page it has open the second page as full screen for that i have to write the code in page load. can u please tell me the solution to achieve this one. i line what i used is
Application.Current.Host.Content.IsFullScreen = true;
Thanks
P.Nagaraju.
Loading
nagarajuPosted Nov 16, 2011, 7:59 AM
it is working when i put the project as startupproject and it is not working when i redirecting to one silverlight project to another silverlight project. if u have any idea tell me
Thanks
P.Nagaraju
Priya LingePosted Nov 16, 2011, 1:52 AM
After Enable running application out of browser ,Click on Out-Of-Browser Settings... button
you will get Out-Of-Browser Settings window,in that plz set Require elevated trust when running outside the browser to true
just checked this checkbox.
Then u will get Application.Current.HasElevatedPermissions to True.
Please check attached code file .u can boolean value of Application.Current.HasElevatedPermissions is true.
nagarajuPosted Nov 16, 2011, 1:39 AM
i set set Enable running application out of Browser and saved it and i run that project still still i am getting the value as false.
bool featureComplete = Application.Current.HasElevatedPermissions;
the value of featureComplete is false. can u please tell me still i have to fix anything to get that bool value as true.
Thanks
P.Nagaraju
navjyot rautPosted Nov 16, 2011, 12:12 AM
I have attached an application, there is some code in App.xaml.cs file too. plz have a look
Priya LingePosted Nov 16, 2011, 12:05 AM
1. For security reasons, Full Screen can only be enabled in an event that was fired by the user, such as a Button click event.
It is possible to go into Full Screen mode without user interaction in Silverlight 4's Trusted Application.
2.A Silverlight-based application can enter full-screen mode only in response to a user-initiated action. This means that you can programmatically switch to full-screen mode
only in a user-input event handler.
3.An elevated application can go full-screen without requiring explicit user-interaction to drive that full-screen mode. So, an application could go full-screen as soon as it loads with something like.
public MainPage()
{
InitializeComponent();
Loaded += new RoutedEventHandler(MainPage_Loaded);
}
void MainPage_Loaded(object sender, RoutedEventArgs e)
{
if (Application.Current.HasElevatedPermissions)
{
Application.Current.Host.Content.IsFullScreen = true;
}
}
When (Application.Current.HasElevatedPermissions) is false,it will not set to fullscreenMode.
If we set Enable running application out of Browser to true,then
Application.Current.HasElevatedPermissions this condition will be true and it set full screen mode to true.
Application.Current.Host.Content.IsFullScreen = true
Please check above code to understand the trusted application.
Hope this will help you.
Thanks.