How do I create an expaning panel in Silverlight 4? - silverlight

I'm a rank newbie at animations and so on in Siverlight, and have a need to create an expandable panel, which can be used as a help facility. The idea is that the screen would have a small button at the top-right, and when clicked, this would animate the width of a panel containing help info from zero to some width. Clicking the button again would shrink the help panel back to zero width.
This sounds like it ought to be really easy, and in WPF it is, but as Silverlight doesn't seem to support a lot of the functionality of WPF, I'm struggling badly here.
I looked at the expander control from the toolkit, but as far as I can see, this doesn't do what I want, as the control always takes up the same screen area. I want the expandable panel to disappear when it's not in use.
Anyone able to provide a simple example of how this could be done? Note that I'm using SL4, not SL5.
Thanks very much in advance.

If you've got access to Expression Blend, this can (almost) all be done in XAML.
This is a good place to get started

Found another SO question where someone posted XAML to do something almost identical...
Silverlight Project - Slide-in and out Panel - How?
Hope this helps someone else :)

Related

Windows Presentation Foundation Adaptive Application

I am new to WPF, i need to know, is it possible to make WPF application responsive, if so, how ?
What i meant with responsive is, all content and controls resize with window resizing accordingly.
This is an extremely general question. The answer would most likely end up being a WPF tutorial, which there are already plenty of.
For your needs, my advice would be to check out the layout system, if you use the correct layouts in the correct spots, your content will resize as you wish.
This link helped me a lot when I started WPF : WPF tutorial #layouts
Its content is limited, so you'll want to look somewhere else eventually, but it does a good job of giving an overview of what is available.
The ones that are most usefull for me are Grid Panel & Dock Panel, ocasionnaly the Stack Panel. Viewbox is usefull for more control on resizing content.
Hope this helps, good luck.

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.

Custom Wpf ListBox Control

I'm new to wpf and have just been given a project to create a set of custom controls which will be used to make a previous windows forms application more manageable and current. However I cannot seem to find much info with regards to customising the built in Listbox, this would involve preferably replacing the scroll bar and the +/- buttons with custom images etc..
Just wondered if anyone knows how to get at these ?
Thanks in advance.
Check here for the default control template of the listbox.You can customize the scrollviewer there to do what you are looking for.Check the below article to get started
Using Templates to Customize WPF Controls
Learn about WPF styling and templating. Other than that, the question is too generic for SO. Read the article (and perhaps google some more articles on the topic), try to style the listbox and come back with specific issues. WPF is not easy to get into, but it is definitely worth the time.

Best practice for panning/zooming a user control?

We currently have a user control which displays a dynamic matrix of other user controls. Since it's dynamic, the view can become large, requiring the user to scroll up/down & left/right in the browser to view everything.
I would like to give the users one view of the user control with the ability to pan & zoom on it, much like the feel of this Telerik control. We own the Telerik controls and I've tried to use the Map control for our purpose, but it doesn't seem like that is going to be a good solution.
I have also placed a Canvas inside of a scroll viewer, and was able to make it pan (using scroll bars) & zoom (using Scale Tranform). This works pretty well, but it's not smooth like the Telerik control is.
So, I'm wondering what other ways there are to do this. Am I overlooking a Silverlight control that would work for me? Any input would be greatly appreciated!
I found this on CodePlex and I like their approach. I will probably be customizing it to be exactly what I want, but it's a good start. Note: It does not implement the 'throwing' capabilities.

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