Can Silverlight copy a graphic from the clipboard? - silverlight

Can a Silverlight application copy a graphic/bitmap from the clipboard? If so, how is this done?

AFAIK there is no direct support for Silverlight clipboard.
If you want clipboard access for text, then probably you need to look at this blog post by Jeff Wilcox
Silverlight manager though admits that there is no clipboard support

Currently there is no way to access image data from the clipboard. You would need to save the data on a clipboard to a file and then load the image from the file via OpenFileDialog.
With Silverlight 4 you make that process ever so slightly slicker by dragging the file onto your silverlight app.

Coming up in Silverlight 4 (hopefully the next beta) there is rumored to be support for image formats on the clipboard. Silverlight 4 supports text on the clipboard and I'm keeping my fngers crossed that it will extent to images by RTM.

Related

Access to clipboard in Silverlight

Can I get image from clipboard in Silverlight? How I can do it?
In Silverlight 5, access to clipboard information is limited to Unicode text access. This differs from the WPF implementation of Clipboard, which enables access to other specific types (for example, streams or images) or to data objects.
Details: http://msdn.microsoft.com/en-us/library/system.windows.clipboard(v=vs.95).aspx
This may help you: How to copy image of a chart from Silverlight application to clipboard?

How to paste a text from textbox to some other application without using SIP?

I have made my own keypad.I know about the copy paste feature of WP7. I want to paste the copied text from textbox to some other application without using SIP.
Issues:
Copy the text by using default copy paste feature of WP7.
Get the copied text means from where i can get the copied text.
Now i don't want to use SIP to paste the text because i m hiding the SIP and using my own custom keypad.
I want to paste the copied text to some other application. So how to do this. Is it can be done with clipboard or through some other way.
Need some links to do so.
In the current version of the framework there is no API for working with the clipboard, though the Silverlight 4 Clipboard API will be coming in the next version.
However, if Matt Lacey has produced a solution that works by saving text information in JPEG images. You would be able to access this virtual clipboard from any of your own applications. http://blog.mrlacey.co.uk/2011/03/wp7clipboard-clipboard-api-for-wp7dev.html
While not possible now, one of the slides from Mix included a reference to a "Clipboard API" as part of the extras we'll get in the move to Silverlight 4 which is coming with Mango.
Hopefully that will complete the picture with regard to copy & paste / clipboard functionality.

What controls should I use on a Silverlight website for loading textual content?

I am embarking on development of a Silverlight based website. I am the lone developer and am doing it on my own (ie, not for any company).
Now I want to load a lot of textual content on the website along with animations and rich user interfaces that can be created using Silverlight. The text content may change from time to time and when that happens, I don't want to do a lot of rework. So I m thinking to load the text from a Word/text file into controls and whenever new content arrives/existing content is modified, I just have to append it to the Word/text file.
This way the application itself remains untouched, only the file contents keep changing. Silverlight doesn't support FlowDocument. RichTextBox doesnt have a Load or LoadFile property. So how do I go about this? Should I make use of Frame, Downloader and similar other controls as well? What do you suggest? What would be the best approach to this?
The RichTextBox does have a Xaml property so you could download Xaml files containing the restricted set of textual elements that RichTextBox supports. You could also create a Silverlight editor around which you could create and upload this Xaml text content.
However have you considered whether Silverlight is the right platform to deliver primarily textual content? HTML is pretty good at that and with frameworks such as JQuery you can create quite interactive experiences that work well across browsers.

how to Load PPT in silverlight

I need to prepare proof-of-concept for a silverlight application. For that I need to load PPT in silverlight. I just need to load PPT in browser and allow the user to perform next, previous, stop and pause actions. Anybody can help out.
It may be that you need to convert the powerpoint slides to images first? then build a "player" in silverlight to show these slides?
Not sure if Office supports export to Images? (for a manual process) but you could print to PostScript and convert to images using GhostScript.

Can Silverlight do the following?

Can i do the following in a silverlight page/app? (Note: the silverlight app will be embedded on an ASP.NET MVC website page) :-
Display an image from a resource: eg. www.someDomain.com/image.png
Url of the image to display is passed into the control (ie. it's not hardcoded, but .. say .. entered into a textbox via the user, on the page).
Resize the image.
Add layers to the image. A layer could be .. i donno .. some basic text or another image or icon
change the font or font-size of a layer font.
'Save' the modified image to another url, via an HTTP-POST. So if i've resized the image or added some text-layers these are all rendered into a single bitmap (png/jpg/whatever) which is then POST'ed to a url as binary. (ie. multipart/form-data)
Note:
I've asked this question before but that was for Flash (flv/swf). I'm now interested if this can be done in silverlight.
Updated Question
Also, what software is required to create these silverlight apps? VS2008? Expression blend? I know u can use notepad .. but i'm so new to this I would need some WYSIWYG app, I expect.
The Writable Bitmap API Silverlight 3 sounds pretty much what you're after. You can use the standard Silverlight controls such as TextBlock and Image to lay the image and layers out and then use the API to take a "screenshot" of that layout to upload to a server.
Hope this helps.
Yes it can, but it has similar crossdomain restriction as flash. You'll need a crossdomain.xml or clientaccesspolicy.xml in place on the remote servers to allow silverlight to communicate with them. There is an ms article here which gives some more information on the restrictions on using silverlight to talk to other servers.
Once you have the image then you can manipulate it on the client side using the normal .net libraries for such purposes.
So you might load it with
Bitmap bitmap = new Bitmap(<some stream>);
Graphics g = Graphics.FromImage(bitmap);
and then you can play with it in any way you wish.
g.DrawString("Silverlight image",
new Font("times", 32),
SystemBrushes.WindowText, 0, 0);

Resources