Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
345
enlarge map when changed to Full Screen
posted

There are about 5 controls in a silverlight page, WebMap is in the center of the page, its size is 400*300.

When changed to Full Screen mode, Could we only show the WebMap control and make its size to the screen's size?

Really appreciate if an example can be provided.

TIA

Parents
  • 345
    posted

    I tried to use ScaleTransform on FullScreenChanged event, but the quality of the map was reduced and the map only covered the right side of the screen.

    Controls on left side are still there.

    Code:

    ScaleTransform sc = new ScaleTransform();
    sc.ScaleX = App.Current.Host.Content.ActualWidth / worldMap.ActualWidth;
    sc.ScaleY = App.Current.Host.Content.ActualHeight / worldMap.ActualHeight;
     worldMap.RenderTransform = sc;

    worldMap.Height = App.Current.Host.Content.ActualHeight;
    worldMap.Width = App.Current.Host.Content.ActualWidth;

Reply Children