What is the best way to make a full page Silverlight web part in SharePoint 2010 - silverlight

I want to make a silverlight web part hosted in SharePoint 2010 that will take up the entire screen. I know how to get rid of all the SharePoint navigation through CSS or a custom master page, but I'm struggling with how to get a web part zone to grow to the full height available. I've messed around with using CSS or jquery to set the heights of the various tables and divs that wrap a web part and haven't found a good solution. Has anyone done this?

How about not using a webpart, and just embedding the Silverlight application into an empty page with an empty masterpage?
You can grab the html or aspx page that Visual Studio generates when you create an new Silverlight project.

I would suggest you to get a new master page for this purpose. You can get the minimal master page here:
http://blog.drisgill.com/2009/11/starter-master-pages-for-sharepoint.html

Related

Angular Single Page application and SSRS reports

We are creating a SPA with AngularJs and want to integrate our existing SSRS reports in this application. We have SSRS reports already consumed by our WPF application using .Net Report Viewer but, we are not sure how we will be able to that in this web application.
One thought we have is that we can create a ASP.Net application which will have a app folder that contains all the templates of our application and for reports we can have normal aspx page and add a report view control on that page.
But, we dont want to use ASP.net just for this purpose.
Does anyone has any idea if we can render SSRS reports in simple HTML page and have basic functionality like save, print which are there in report viewer
Thanks for the help
I know that this is an old question, but just in case somebody else will still came upon it, here can be a possible solution for the problem. The solution described here will allow you to display the report as PDF, having the possibility to print or save it.
Integrating SQL Server Reporting Services (SSRS) with Web-API and AngularJS by Chris Briggs
http://blog.chrisbriggsy.com/the-first-step-towards-integration
http://blog.chrisbriggsy.com/How-to-Integrate-SSRS-and-WebAPI
http://blog.chrisbriggsy.com/AngularJS-SSRS-Pdf-integration
Best,
Razvan

Aspose PDF viewer

I am using the Aspose PDF tools and have successfully got it to print the pdf which is great, but ideally I want to be able to add a wpf control to display this as well.
I would have assumed that the PdfViewer class would have something, but I can't tell.
So far I have needed to use a different control MoonPdfPanel which is annoying as I would have preferred 1 tool to do both jobs.
Does anyone know of a control I can use to hook into the aspose?
Thanks
We have developed an HTML5 PDF Editor application using Aspose.Pdf for .NET API which you can use in your application as a PDF Viewer as well. You can get the details and complete source code here. You can use the source code to edit the viewer as per your requirement.
P.S. I am working as social media developer at Aspose.
Well, if you are interesting in viewing the PDF file, you may convert the file to HTML and display it using an IFrame in your application. I have developed a sample application which performs different operations including viewing a PDF file in IFrame. Download it and try it at your end. Another option is that you can convert the PDF file to images and display in Imageviewer in your application (Code is available in the above application).
P.S. I am working as social media developer at Aspose.

Embed another xaml silverlight object in page

I am totally to Silverlight and am Getting started. I finished the first of the Getting started series here and now seeing into HTML Bridge now over here. Visual Studio created a website for me when it created the new silverlight application. For the HTML bridge tutorial I created another silverlight page(Is this what i should create) and put some code into it.
Question
How do I embed this into a html page? ( I know how to do it using markup as well as javascript, I am confused as to how to get the application out of single xap file inside ClientBin directory)
With Silverlight you are dealing with a single plugin within a HTML page. That plugin is the single XAP file that the HTML page downloads.
Your Silverlight app may also have many pages, but its navigation is not the same as HTML navigation (it uses bookmark URLs to fool the browser into staying on the same page while it changes content). There is only the one HTML page involved.
Initially, just to test your new page, you can change the app.xaml.cs file to create your new Silverlight Page instead of RootVisual = new Main() etc. Long term you need one Silverlight application per separate plugin your require.
Update (from comments):
Pages in Silverlight are changed by substituting a visual element of the single main page with the contents of another Silverlight page.
You cannot simply replace the RootVisual (as that can only be set at startup).
Start with a new Navigation or Business application project to see the basics (navigation adds a lot of complexity, but once you see how it works it is pretty cool).

Silverlight: Navigation app template - can we have cleaner urls? And urls like asp.net MVC / Routing has?

I have just created a new silverlight app using Silverlight navigation template. All went well and its working :-)
But the url has an extension of aspx ... can we not remove like asp.net MVC has done?
SilverlightApplication1TestPage.aspx
The next thing that i found strange is how it appends the page name, it uses # symbol like so
SilverlightApplication1TestPage.aspx#Home
I thought it would be more natural to do this (also like asp.net mvc does)
SilverlightApplication1TestPage/Home
SilverlightApplication1TestPage/About
Is there a kind of work around or updated tamplete of some kind
Or its not possible?
Thanks
I'm using Silverlight with Asp.Net MVC and here is a sample URL: http://localhost:37920/#/AdvancedSearch. When I was using straight Asp.Net then yeah I had .aspx files in it. It Still isn't what you really want but gets you closer maybe.
The bottom line is: no. To simplify it everything in a URL prior to the # belongs to the server and everything after the # belongs to the client.
A Silverlight application exists entirely with with in a single URL (page) from the servers perspective. When you use the Silverlight navigation framework you are moving about within the app inside this single HTML page.
If the # is removed there would be fetches made to the server and the results would replace the existing page, the current SL app will be unloaded to be replaced with the resulting content. Even if that resulting content is the same SL app but directed to a different context it would still unload the app and reload it.
The use # is merely a means for navigation within the Silverlight app to be tracked within the browsers navigation history. The browsers own back button will then operate in a way that doesn't surprise the user.
THanks everyone for comments, it got me thinking... and i think i have fixed it.. and found a solutions using asp.net 4.0 routing...
Add a global file to the asp.net project and then add this to application start
// Code that runs on application startup
RouteTable.Routes.MapPageRoute("SilverlightRoute",
"MyApp",
"~/SilverlightApplication1TestPage.aspx");

Is there a "Browser Control" to host a website inside Flash/Silverlight?

I'm looking for something similar to the VB6 / .Net Winforms "Browser Control", that let's you show a browser inside your application.
I don't want to just render a page, I want it to be a fully-functional browser, in which people can click links, will run Javascript, etc.
In essence, what I want is an IFrame, only that it runs inside a Flash app, or a Silverlight app.
The ultimate reason for this is that I want to defeat IFrame busters. I'm making a web app that lets you see other sites inside of it, and I'm running into a bunch of sites that have this code:
var t=top.location,w=window.location;if(t!=w) t.replace(w);
(that's from eBay BTW)
which essentially pops the user out of my site and into theirs.
My hope is that by using a "browser control" of some sort, inside a plugin sandbox, "top", will be top for that browser control, and not for my site.
Of course, if you have any other ideas to achieve the same, they'll be more than welcome.
Edit: I've tried the Component One control suggested by Bill, but it didn't work for these purposes, because it's creating an IFrame outside of the SilverLight control, so it executes in the same context as the page hosting Silverlight, which is what I'm trying to avoid.
Northcode SWF Studio allows you to add browser window on the stage in Flash. I personally use SWF Studio as a third party SWF2EXE tool to extend the power of Flash projectors. It's quite stable and powerful. As far as browser control is concerned here is the example you can download and test if it serves your purpose. Check the Browser APT here.
We've not built a component to enable folks to do this but we're open to suggestions here. That being said, easiest solution is an iFrame, but word of caution in that when you overlay an iFrame over the the top of Silverlight we've seen customers experience perf issues as a result (mostly due to alpha transparency of the iframe etc).
This isn't isolated to Silverlight, Flash suffers the same issue as it has to do with browsers and rendering within the given operating system.
HTH.
Scott Barnes / Rich Platforms Product Manager / Microsoft.
I use the HTML control created by Component One. It has the limitation that the Silverlight object in the page should be set to windowless, but otherwise it works very well.
It's an old post but I'll add my tupence answer. I used the DivElements free control for Silverlight link text and it works quite nicely. It just positions the div accurately so that it looks like it's on top.
As for the other such controls, you've got to set the windowless property of the Silverlight container to true.
It works really well for me and I'm able to seemlessly have Google maps and the Acrobat plugin displayed side by side with my Silverlight application.
PS: because the component just adds a <div> to the page, you can't do stuff like having it load dynamically Javascript file like in the <header> tag.
PPS: when setting the HTML code "by hand", be sure to hook up on the DocumentReady or Loaded event before playing with the HTML DOM.
Hope that helps someone.

Resources