What is the difference between "Window" and "page" in silverlight - silverlight

What is the difference between "Window" and "page" in silverlight? If I want to embed a page/ window inside another page/ window. How can I do that? For example, when an "Expand" button is clicked, if I dont want it to link to a totally new page, instead, I just want it to show a form embedded in the page / window.
Thanks :)

The simplest solution to this question would be to handle the click event and set the visibility property on the elements you want to show/hide in the event handler.
The link that #Robert provided is about "navigation" in silverlight, you can achieve your end goal using it and if you're planing a large application i'd say it's definately something you should look at but it'is a fairly complex subject.
Depending on your current level of silverlight knowledge and the scale of what you're trying to achieve with your silverlight application it might or might be better to take the simpler button click approach.

Take a look at this article. I think it will help you achive what you're trying to do.
http://jesseliberty.com/2008/05/31/multi-page-applications-in-silverlight/

Related

Force visual layout of hidden tab content

I have some quite complex content behind several tabs. I'd like to force the layout to happen at application startup rather than lazily as the user clicks a tab for the first time. The delay is about a second or two per tab, and it's a bit embarrassing!
Edit: I think the problem is that only the selected tab's content control is in the visual tree. Calling ApplyTemplate of the HeaderedContentControl didn't make any difference.
Does this link help you?
wpf force to build visual tree
Basically it says to use ApplyTemplate on the ItemsControl...I guess that for the tabs you should do it for each TabItem.
There's also another technique used in this site:
http://xcalibur37.wordpress.com/2012/07/12/make-your-tabcontrol-preload-in-wpf-silverlight/
Here he creates a kind of preloader for each tab. It's for silverlight but I think it can be applied to WPF.
Hope it helps out :)

Changing whole window content with MVVM architecture

I am new to WPF/MVVM and I need to create a single application window.
To clarify, I would like to have a single window with a basic menu, which, depending on the option clicked on that page/window, launches a completely new set of controllers within the same window (completely replacing the menu interface).
Basically, I'd like to be able to replace the content of the menu window, with the content of new user interface, and then to be able to go back to the menu interface again later.
Any directions? Thanks.
PRISM Navigation is the way to go. You can read about PRISM Navigation on MSDN. It provides a good explanation with a lot of code samples. Karl Shifflett also has a couple good blog posts here and here which are helpful.

Winforms - how to create something similar to a master page?

I'm trying to build an app in winforms with something similiar to masterpages in asp.net - a menu on top and when choosing an option from the menu the entire screen on the bottom will change while the menu remains (there are 10-15 screens in the future app, some are quite similar, some are not).
What is the best way of doing this? Should I use different forms for each screen or use a panel or something else?
If I use a panel or something how do I manage to use the designer with so many panels taking space on the screen?
Try with the MDIParent Form's. View the Example
http://www.codeproject.com/Articles/12514/Multi-Document-Interface-MDI-tab-page-browsing-wit
If it is just keeping the same menu and opening/closing parts of the UI you could simply add and remove instances of usercontrols to the main form.
If you need more features such as docking (like Visual Studio) look at this
Another option is to use Form inheritance
Which one to select depends on what you want to reuse and the features you need.
One option would be to make your application an MDI window and then load entire forms, maximized, into the parent window.
Then, you would be able to treat each form as its own self-contained item, since it really would be exactly that.
Is it not an option for you to use WPF? A WPF browser application fits the paradigm you are describing quite well.

Can I use the WP7 Panorama control outside of WP7?

I need a WPF control that acts like the Panorama control for Windows Phone 7, but I need it for a desktop application.
It will contain a series of panels (or Panorama Items) that the application will be able to slide through horizontally programmatically.
Also, the content inside the panels not currently displayed on the screen will need to be "lazy loaded". In other words, they should be referenced but not loaded or rendered.
Can I somehow adapt the WP7 Panorama control to do this? Or will I have to develop a custom control from scratch to behave similarly to it?
Thank you!
EDIT:
I could probably use a VirtualizingPanel to implement the lazyload behaviour.
MahApps.Metro while still not super mature does allow for the wp7 Panorama control. Demo of how to use a panorama here. I've played with it a little and while its not the most customizable thing out there it gets the job done. Pretty sweet. Also Sacha Barber (Codeproject Demigod) wrote up an article on making your own. Of which I haven't looked at yet but, the guy usually does awesome work. So I'd check that one out as well.
http://blogs.microsoft.co.il/blogs/arielbh/archive/2010/10/21/porting-windows-phone-7-s-panorama-control-to-silverlight-4.aspx gives some clues about how do to this.
It suggests using http://phone.codeplex.com/ as your base and then you can use http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=4b281bde-9b01-4890-b3d4-b3b45ca2c2e4 (Microsoft Surface Manipulations and Inertia Sample for Microsoft Silverlight) to run convert get it to respond to touch.
Seems none exist as far as I can see so far.
This blog has started an attempt at making it, so you could work from there to make your own. Be sure to also check out this page which details the creation of an individual panorama item too.

Silverlight - How to implement this functionality? Nice feature

I don't know what this is called in SL, but I would like to replicate this functionality. If you go to this site: http://www.mscui.com/PatientJourneyDemonstrator/PrimaryCareAdmin.htm and click on the "Show Details" button located on the top, right-hand corder of the screen. When you click on this, there should be a "Scene Details" button-like feature on the right side. When you click on this, this is what I would like to implement. Can someone direct me please? Either to an online article, etc...
I'm not precisely sure what feature of the site you'r referring to (I'm blind so the description doesn't make much sense to me). However, two useful links - some of the MSCUI source code is available on Codeplex http://mscui.codeplex.com. Also, the Silverlight developer/designer on this project created Blacklight http://blacklight.codeplex.com which includes visual assets to use with Silverlight.
Although I don't know the specifics of the implementation, as far as I can guess, this is done by having a second Grid that follows the Grid for the page. Then, simply change the visiblity on the "guide" grid when the button toggles.
I believe that is simple, although it'll require you to work to figure out the positioning of the underlying page - but it's more flexible. With Blend it'll be easy.
Alternatively you could have a ton of additional UI elements on the page next to their respective controls, and either Tag or name them in a way that you can iterate over them to control visibility and interaction.
I think you're talking about a the grey overlay with a modal window on top. I think the best way to do that in Silverlight 3 is with the ChildWindow control.

Resources