Drag and Drop word document onto Silverlight 4 web part within a SharePoint 2010 web page - silverlight

User should be able to drag and drop a word document onto a SharePoint 2010 web page and the content in the word document must be displayed on the page (including images, format etc.)
Any ideas on how to achieve this functionality?

You'll have to bake your own solution here. Luckily, you should be able to get started with TextGlow, which renders docx files in Silverlight. It has an intermediate level of formatting accounted for, but more can be programmed in. It's also SL2.0, so it will need to be updated and customized to meet your needs. See a demo at: http://www.textglow.com/
Then, wrap it in a SharePoint webpart and account for Drag/Drop, etc. There are a lot of good intro videos on Channel 9 about this and lots of other blogs elsewhere.

Related

Implementing Search bar to search topic in WPF HelpSystem

I have implemented a context sensitive WPF Help System using .chm , which shows specific htm files when F1 is pressed. Now I would like to add a search bar to it to search through all the topics in the .chm file. Is there any reference/suggestion how to do it?
Thanks in Advance
You know - there is a fulltext search tab possible for any CHM.
HH Workshop API documents how to move to the search tab and initiate a search. Unfortunately the initiating a search part has always been broken in HH. The only way around this would be to find the HH window and search pane controls. Then control those controls from your application using via low level Windows API calls.
I translated this for working with Visual Basic 6 a long time ago. So the search string is pushed to the CHM search tab and search is starting.
http://www.help-info.de/en/Help_Info_HTMLHelp/hh_api.htm#Search
Disclaimer: This isn't a product link - only code to help (open source).

CRM 2011 - Choose ribbon to show by javascript

How to pick a certain ribbon to show?
I have a Silverlight webresource inserted across the whole page and I want to show a ribbon of certain entity for it.
I suppose it's possible to do it by calling some javascript from XRM library? But I didn't find anything till now.
Thank you
You might be thinking about this backwards. You don't use JavaScript to pick ribbon to show. You set up ribbon anywhere it could show (using RibbonDiffXml) and then EnableRules and DisplayRules to control where it shows. Enable Rules allow you to specify web resources and use JavaScript to control whether the button is enabled. Unfortunately, CRM won't allow you to use JavaScript to control whether it displays (fingers crossed for future availability).
There are lots of examples out there. Here is one and two I just googled up. Be sure to reference the SDK for all the rules. Finally, if you want to short-cut learning some of the schema, you can use the Visual Ribbon Editor tool.
Note that you can either specify your ribbon customizations to a particular entity (in its RibbonDiffXml subnode) or in the global scope (exporting Ribbon Client Extensions) and use the {!EntityLogicalname} in the Id fields so CRM will generate a unique ID for the node, per entity, when it 'expands' the definition.

How to display a word document in a silverlight web page?

I would like to display word docs in our silverlight web application, How can I do this?
See also this question: Displaying Office documents in Silverlight. The short answer is that there are several different ways to do it, but they all start by converting the Word document to an XPS format, and then using First Floor's Document Toolkit to display the XPS format in Silverlight.

Displaying PDF content within Silverlight

The requirement is below:
--> The version of Silverlight is 3.0
--> I don’t want to convert it to jpg, png etc. since I want end user to copy data from the displayed data.
--> I am currently using IFrame to display pdf but it has some problems like IFrame not supported consistently across different browsers.
--> I could not find any control (third party) that displays pdf with SL 3.0 Most of the controls that I came across are either for 4.0 or does conversion into some png kind of format which doesn’t allow user to copy data. If there is nothing that can be done from SL easily then I am ready to use 3rd party controls that are meant to work with SL 3.0 and allow end user to copy data.
--> I thought about reading data from pdf and displaying again over some control like text block but this would eventually become complicated for scenarios where I have to maintain formatting and displaying images etc.
Please suggest on this.
I think you gonna lose this one. I don't know of anything that renders PDF well in Silverlight 4 let alone Silverlight 3.
Whilst this comment "IFrame not supported consistently across different browsers" may be true IFrame is generally supported by the all major browsers.
Hence your best bet is to test and tweak your IFrame solution with these browsers.
Alternatively launch an independent browser window to display the PDF or let the users local system use whatever it has installed to display the PDF.

Starting out Silverlight 4 design

I come from mainly a web development background (ASP.NET, ASP.NET MVC, XHTML, CSS etc) but have been tasked with creating/designing a Silverlight application. The application is utilising Bing Maps control for Silverlight, this will be contained in a user control and will be the 'main' screen in the system.
There will be numerous other user controls on the form that will be used to choose/filter/sort/order the data on the map. I think of it like Visual Studio: the Bing Maps will be like the code editor window and the other controls will be like Solutions Explorer, Find Results etc. (although a lot less of them!)
I have read up and I'm comfortable with the data side (RIA-Services) of the application. I've (kinda) got my head around databinding and using a view model to present data and keep the code behind file lite.
What I do need some help on is UI design/navigation framework, specifically 2 aspects:
How do I best implement a fluid design so that the various user controls which filter the map data can be resized/pinned/unpinned (for example, like the Solution Explorer in VS)? I made a test using a Grid with a GridSplitter control, is this the best way? Would it be best to create a Grid/Gridsplitter with Navigation Frames inside the grid to load the content?
Since I have multiple user controls that basically use the same set of data, should I set the dataContext at the highest possible level (e.g. if using a grid with multiple frames, at the Grid level?).
Any help, tips, links etc. will be very much appreciated!
Microsoft has created a great community site for helping people get started with both design and Silverlight here: http://www.microsoft.com/design/toolbox/
It may be far more than what you need for your current project, but it definitely will give you the training you need to master Design with Silverlight.

Resources