How to generate .xap files in silverlight - silverlight

I have a silverlight application with 2 pages, first is "animation" and second is "transformation"
first page works well, but second display nothing and i think the problem is: i don't have any transformation.xap. I only have have the animation.xap in my "clientBin" data for some reason
So here is my question: can i generate a .xap file for my transformation page so it can works?

Both pages are stored withing the same Silverlight application.
If you want to switch between pages you'll need to either:
Create another project that contains the transformation page and
redirect the browser to the page hosting it
Switch pages by setting the application's RootVisual to the page you want displayed

Related

Access Specific PDF Page in WPF WebBrowser Control

I have a webbrowser control in my application that is used to display pdf files that have been created in iTextSharp and are stored locally on the hard drive.
I would like to be able to navigate the file (next, previous, first, last, toc) from my application rather than using the inbuilt nav of the reader in the browser.
I have seen that you can navigate to specific pages by using
Browser.Navigate("filename.pdf#page=?);
This works the first time but when trying to navigate to a different page, it makes the browser disappear completely with no errors. However, I can reload the file without problem if I don't have the #page=? suffix on the file url though. Any ideas on this?
Alternatively, is there anyway in iTextSharp of adding something to the file to allow for it to be navigated from an external command?
All the official parameters that can be used to navigate through a PDF using parameters in the query string after the ? character are listed in a document published by Adobe: Parameters for Opening PDF Files
You already mentioned the page parameter. Another option could be using named destinations: nameddest=destination. In this case, you need to add the anchor with name destination to the file using iTextSharp.
Note that not all viewers implement these parameters. Adobe supports them in Adobe Reader and in the Adobe Reader plug-in, but there is no guarantee that they will work in pdf.js (Firefox), Pdfium (Google Chrome),... If your browser disappears when using an open parameter, you may have hit a bug in the browser or the viewer plug-in that causes the browser to crash. iTextSharp nor iText can crash a browser ;-)
There are no other ways you can navigate a PDF from an external application. The only thing you can do, is to add JavaScript to the PDF so that it always opens at the same page. This is done using an open action. I don't think this solves your problem as it would mean that you have to change the PDF file every time you want it to open at a different page.

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).

How get XAP name from Silverlight application with MEF?

I am writing Silverlight 4 application with Navigation framework and MEF.
In my application each menu for navigation must load on MEF project and show it.
But there are some problems. First of all I can't navigate to page of other XAP(see David Polls post). To do that I need DynamicNavigation.dll and must create extra pages, which is not acceptable in my case. Other soluction can be found on davidezordan.net. This version is looks much better.
Second problem for me is that example works great if there is on additional XAP, but if I load 2 or more XAPs(by clicking on menus for navigation), I can't decide which page to show.
If 2 XAPs are loaded MEFModuleList contains 2 pages and I can't get any information about them to decide which page to show.
One solution is to hard code XAP name of each project in pages, which will be loaded to MEFModuleList by Attribute or other way, but it is not good solution.
Is there any other way to solve this problem?

Silverlight displays solution name as title of page until application loads

I have a Silverlight 4 application and I cleverly name my apps by whatever color strikes me as appropriate to the project I am building. | It works for me. | My problem is that when I launch the application the solution/project name displays in the title/tab until the home page loads and then whatever I have set as my page title in my resx loads. It exhibits the same behavior on production as well as my development box, in-browser and out-of-browser.
I have poked around until I am crossed-eyed but cannot find a way to display a more appropriate title on initial load. This isn't a project killer by any means but an inconsistency that I find rather annoying.
You should be able to set the title of the page in the Title tag of the aspx file in your Web project.

dotnetnuke: can we create a master page?

Can we create a content managed master page in dotnetnuke?
eg. I want the right pane and bottom pane to be content managed, but to show the same thing across all pages.
Thanks
What you are describing is essentially what DNN calls a Skin.
A DNN skin is actually just an ASP.NET user control (ascx) that dictates page-wide or site-wide look and feel, which offers developers the same functionality as a Master page, except that it ties into DNN-specific elements and uses some DNN-specific user controls, such as menu/navigation, logo, breadcrumbs, login/user account links, etc.
Now, in order to add the ability to provide content management capabilities site-wide, you specify an area in your skin to place a module (let's say, a Text/HTML module). This area is called a pane. Once you add a module to this pane, in its settings you can tell it to appear on every page. This way, the module can be edited on any page, and its changes will be reflected on all pages automatically.
Check out DNN's site, as it contains a TON of documentation on how to do many common tasks: http://www.dotnetnuke.com/Support/Documentation/DownloadableFiles/tabid/478/Default.aspx. Under the Technical Documentation section, you'll want to grab the Skinning document (I believe it's a PDF).
DNN Modules can be set to appear on all pages by checking a checkbox in the module settings. However DNN does not use the concept of a Master Page. It injects modules (user controls) in containers on a single aspx page at runtime.
A Master Page would be a great addition to DotNetNuke you cannot replace content in a single area of the page. The whole page refreshes. For example if you have a menu and you only want the content of what you select to appear in a specific content area without refreshing the rest of the page you have to resort to third party modules that attempt to do that but usually fail. There are 'module wrappers' but all the ones I've tested have issues with modules that allow the user to edit content. Edit screens are usualy different user control files (ascx) that are launched when you edit the module content. Since the page refreshes with the new page you have lost your place. Those module wrappers work fine for static content and some other controls but not for all controls.
IFrames can be used (DNN has one) to trade out content but that doesn't get rid of the probelms mentione above. I'm heavily invested in DNN, running the UCanUse.com web site so this isn't a slam on DNN. I just thought I'd try to answer the quesiton with detail.

Resources