Is it possible to use the WP7 Panorama or Pivot in SL4? - silverlight

I'm making pretty heavy use of the Panorama and Pivot controls in my WP7 applications. Is it possible to use these same controls in a standard Silverlight (4) application?
http://phone.codeplex.com/
I added the dll's, was able to compile and create the controls in my views. However; I was not able to "Scroll". I thought they used the "LeftMouseDown" event handlers but I guess I'm wrong.

You would need to do additional work to get them to work on the desktop: manipulation events are used in phone controls since they have much more information available such as the maniupation delta.
Being an open source project I am sure they could look into adding that support, would be good to open such a work item on that site perhaps. (There are no official Pivot and Panorama controls yet from Microsoft)

I created a panorama-like control for SL4 in the following blog post:
http://www.scottlogic.co.uk/blog/colin/2010/10/silverlight-as-an-alternative-to-powerpoint/
It might be a good starting point for making a more fully features control

Related

dragable controls in runtime Similar to a toolbox in wpf

I want to create a project in WPF for designing a custom report.
For this, I need a library to add controls to a panel, canvas, etc. with drag and drop at runtime.
Controls should be resizable and moveable with the mouse. Finally I want to print this.
Telerik's WPF controls contain the Diagram Control which supports the features you mention out of the box. I use it for a very similar scenario as you describe and it works well. The might be a counterpart offered by Infragistics as well.
With .NET framework's built in features and/or free libraries you will able to cover the drag&drop part. You will have to implement the rest yourself which is possible but too much to ask for one question.
Late reply, but I came across this. Take a look at this
There are 4 parts that show how to do a toolbox with what you're looking for.

Migrate application from WPF to Silverlight

I saw a lot of question on this topic and it took me some time to decide whether or not I would write another one ... but I think my question is a bit more complicated ... so here we go.
I'm currently working with a WPF application using MVVM.
The application is built with:
WPF
Prism V2
Ideablade (devforce) to access a database
Avalon dock for the docking feature
Telerik for the grid component
Views and ViewModel are generated with .tt file.
Views are generated in xaml (for WPF) files.
I know that:
Telerik has Silverlight controls
Using Prism V2 will probably help me doing a Silverlight version of the application
I don't know:
If the usage of devforce can be a show stopper
If the usage of avalon dock can be a show stopper
My question:
Appart from generating xaml for Silverlight ... where do I start ...
----EDIT----
Please, avoid any comments like "Silverlight will die" or "Silverlight xaml is a subset of WPF xaml".
It is a proof of concept and should be made using Silverlight. For the xaml, I can modify the application to use only simple ui element that can be both in Silverlight and WPF.
Depending on how you actually used Prism and other frameworks this can be a lot of work or quite easy.
I'd start at the 'bottom' because I'd expect the Models and ViewModels to be quite portable, at least that is what I have experienced so far. She fact that Silverlight more or less forces you to write async code everywhere might encourage you to investigate in (yet another) framework such as Rx
The Views could be quite a hassle; you will have to find controls that provide the same features that you are using in WPF, build them or invent something new. That can be a lot of work.
Another thing to consider is when your WPF app relies on many desktop features you might consider creating an Out of Browser Silverlight App.
As with any project try to find areas that will probably need a lot of attention and do those first; it's a waste of time to get a lot of stuff working to find out later that you will have to replace it because of an impossibility elsewhere.

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.

Visual Studios Controls

Is there a way to download more controls or anything, because I have seen a few things in other programs I don't think I've seen in the toolbox. Can you download new ones, or did the company somehow custom make a control? If it was custom made, are there any tutorials I can take a look at that tell how to make your own?
Some companies make third party controls for Winforms - Telerik is one I know of.
Personally, I prefer to make my own controls based on the existing WinForms ones, as I have more control over them - this prevents my products from having bugs which just can't be fixed. I can also tweak the controls to do exactly what I need, rather than choosing a closest match. Building custom controls is relatively easy if you have the experience.
There is a basic tutorial on CodeProject which shows how to create a fancy Button. After that you should be able to figure out how to customize more complex controls.
Side-note:
While it's reasonably easy to develop custom controls in WinForms if you have the time to practice, WPF is a much better framework for building custom controls. WPF controls are designed specifically for customization, so there is a lot more flexibility.

Coded UI Test - get my custom object (WinForms)?

I want to create an automated UI test that will test my syncfusion grid. My problem is that the recorder can't recognize this control (or any syncfusion control). I've searched a lot in the internet but I couldn't find any extension so the recorder will recognize my controls (I'm using WinForms, not WPF!), or at least a way to extend the recorder abilities so syncfusion's controls will be recognized somehow.
Is there any easy way to extend the recorder? Or is there any extension available?
Or maybe can I get the grid object from the WinClient that the recorder generates?
Thanks!
Start your program. Run the Spy++ utility. Type Ctrl+F to start the finder tool and drag the bulls-eye onto your form. Ok, Synchronize and have a look-see at the windows that are visible in the tree. If you see regular Windows Forms controls, like a Button or a Label, but not any of the SyncFusion controls then you've probably found the source of the problem.
Component vendors that try to improve .NET controls typically do so by creating 'window-less' controls. They are not really controls, they don't derive from the Control class and don't have a Handle property. They use the surface of the parent to draw themselves, making them look just like controls. The .NET ToolStripItem classes do this. And this is also the approach WPF uses.
The big advantage is that they render quickly and support all kinds of effects that regular controls can't support, like transparency, rotation and anti-aliased window edges. The big disadvantage is that the kind of tool that you are using suddenly gets noddy and can't find the control back. Because they work by finding the Windows window back on your form, there is no window for them.
This is a hard problem to solve, the 'control' exists only in memory and there's no good way for a tool to find it back. Using Accessibility is about the only other way for such a tool to find a control that I can think of. Which would have to be implemented by the control vendor first, a somewhat obscure feature that gets easily overlooked. You really do need the help of the vendor to find a workaround for this. Shouldn't be a problem, that's why you paid them the big money.
This is Rajadurai from Syncfusion. Thank you for your interest in Syncfusion Products. To make UI Test Automation recognize Syncfusion grids(WinForms), some internal support need to be provided in grid whose implementation is in progress and about to be completed. Please submit an incident through Direct-Trac for any further related inquiries in the following link.
http://www.syncfusion.com/Account/Logon?ReturnUrl=%2fsupport%2fdirecttrac
You can also contact us through support#syncfusion.com. We are happy to assist you.
Regards,
Rajadurai

Resources