locked
Create empty page in silverlight business application RRS feed

  • Question

  •  I've created a silverlight business application using VS 2010 (framework 4, SL4)

     Then I try add to project an empty xaml page. But when I see this page in browser I see a top menu, login button etc.

    I want to create and see a blank page without anything. Is it possible?

     Thanks.

    Friday, April 2, 2010 5:30 AM

Answers

  •  Just leave only this content in the MainPage.xaml user control. That way the Grid and the Frame will take the whole available space:

     

    <Grid>
            <navigation:Frame x:Name="ContentFrame">
                <navigation:Frame.UriMapper>
                    <uriMapper:UriMapper>
                        <uriMapper:UriMapping Uri=""
                                              MappedUri="/Views/Home.xaml" />
                        <uriMapper:UriMapping Uri="/{pageName}"
                                              MappedUri="/Views/{pageName}.xaml" />
                    </uriMapper:UriMapper>
                </navigation:Frame.UriMapper>
            </navigation:Frame>
        </Grid>
      Hope this will helps you.
    Friday, April 2, 2010 8:11 AM
  • If you want your own page as the start page, add your own page, then go to the App.xaml.cs to modify the code in the following function:

    protected virtual void InitializeRootVisual()
            {
                this.progressIndicator = new Activity();            
                //this.progressIndicator.IsActive = true;            
                this.progressIndicator.HorizontalContentAlignment = HorizontalAlignment.Stretch;
                this.progressIndicator.VerticalContentAlignment = VerticalAlignment.Stretch;

                // Let the user know we're trying to authenticate him            
                this.progressIndicator.ActiveContent = AppRCs.Instance["ErrorRC"]["ActivityLoadingUser"];
                this.progressIndicator.Content = new YourPage();  new MainPage();
                this.RootVisual = this.progressIndicator;
            }
    Friday, April 2, 2010 9:38 AM

All replies

  • If you create a blank page in a business application it will be loaded in your navigation frame, and you automaticly get your login button etc. around your page.

    You can set your navigation frame to the full application size(without the top menu etc.) then you just see your blank page.

    Friday, April 2, 2010 6:21 AM
  •  Ok. Please specify how can I do it.

    Friday, April 2, 2010 6:59 AM
  •  You have a couple of different Visual Studio Silverlight templates - Silverlight Application, Silverlight Navigation Application and etc.. In your case you've created Nav. App. but if you don't need those functionality and buttons, you can create a normal Silverlight Application and you won't see them.

    Hope this helps.

    Friday, April 2, 2010 7:45 AM
  •  For some reasons I need a business application.

    So, how can I set a navigation frame to the fullsize  (without top menu etc)?

    Friday, April 2, 2010 7:54 AM
  •  Just leave only this content in the MainPage.xaml user control. That way the Grid and the Frame will take the whole available space:

     

    <Grid>
            <navigation:Frame x:Name="ContentFrame">
                <navigation:Frame.UriMapper>
                    <uriMapper:UriMapper>
                        <uriMapper:UriMapping Uri=""
                                              MappedUri="/Views/Home.xaml" />
                        <uriMapper:UriMapping Uri="/{pageName}"
                                              MappedUri="/Views/{pageName}.xaml" />
                    </uriMapper:UriMapper>
                </navigation:Frame.UriMapper>
            </navigation:Frame>
        </Grid>
      Hope this will helps you.
    Friday, April 2, 2010 8:11 AM
  • If you want your own page as the start page, add your own page, then go to the App.xaml.cs to modify the code in the following function:

    protected virtual void InitializeRootVisual()
            {
                this.progressIndicator = new Activity();            
                //this.progressIndicator.IsActive = true;            
                this.progressIndicator.HorizontalContentAlignment = HorizontalAlignment.Stretch;
                this.progressIndicator.VerticalContentAlignment = VerticalAlignment.Stretch;

                // Let the user know we're trying to authenticate him            
                this.progressIndicator.ActiveContent = AppRCs.Instance["ErrorRC"]["ActivityLoadingUser"];
                this.progressIndicator.Content = new YourPage();  new MainPage();
                this.RootVisual = this.progressIndicator;
            }
    Friday, April 2, 2010 9:38 AM