Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7843807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T16:40:25+00:00 2026-06-02T16:40:25+00:00

Ok this is the problem. I have a basic web site, which has buttons.

  • 0

Ok this is the problem. I have a basic web site, which has buttons. those buttons are run through javascript and then the code goes in C# and then it does various things with the Silverlight gantt control.

For example if I want to ZOOM IN the gantt control I go like this:

<button id="zoomIn" onclick="SlZoomIn()">Zoom In</button>

then in javascript:

function SlZoomIn() {
    var control = document.getElementById("SilverlightPlugIn");
    control.Content.SilverPlan.JsZoomIn();
}

then in C#:

[ScriptableMember]
        public void JsZoomIn()
        {

            try
            {
                gantt.ZoomBySteps(1);
            }
            catch (Exception e)
            {
                MessageBox.Show("Zoom In does not work.");
            }
        }

This all works fine, but when I want to do things with the gantt that require Events, this is a problem. For example, if I want to print or fullscreen my gantt control. How can I do this?

In C# the code for this is:

private void fullScreen(object sender, RoutedEventArgs e)
        {
            Application.Current.Host.Content.IsFullScreen = !Application.Current.Host.Content.IsFullScreen;
        }

But what do I have to do in javascript to trigger this method? when the user clicks on the button fullscreen?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T16:40:26+00:00Added an answer on June 2, 2026 at 4:40 pm

    There would be no difference in calling this code from JavaScript compared to your previous example, except that the Silverlight plug-in imposes security restrictions for several things, including full-screen mode, print and file dialogs. These mean that these actions have to be initiated by the user clicking or typing something. Explained here at MSDN.

    Therefore you cannot do this from JavaScript, even when the user presses a button outside of the Silverlight plugin – the user will have to click something within the Silverlight plugin, for example a button which raises an event which you handle in your C# code, and take an action directly.

    In the case of full-screen, you will find if you are mixing HTML/JavaScript content with Silverlight that the Silverlight full-screen very likely does not at all do what you want – the Silverlight content will be full screen, and the HTML content will not be visible. You also can’t use keyboard input (mostly). I’d recommend resizing the Silverlight object within the HTML page (possibly combined with maximising the browser window).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

NOTE: I have solved the majority of this problem but have run into a
can you help me with my problem: i have ASP.NET web site that have
I have a plan to build a web-site which running CGI made with Cocoa.
This is my first question on this site, and I only have a basic
I've seen that a few instances of this problem have been raised already. However,
I've searched google and SO for a solution to this problem but have not
Ok I have this problem that I've never had before, it's really bugging me.
Ok I have this problem I'm trying to use Jquery to load a partial
So I have this problem with strings and switch-case, and I'll try to keep
So we have this problem that we are trying to figure out. Heres what

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.