Here is a conversion of the code that you sent.  Hope it helps!

-bill

Console.WriteLine (@"Place HTML on the pasteboard");

UIPasteboard pasteboard = UIPasteboard.General;
string htmlType = @"Apple Web Archive pasteboard type";

// example html string
NSString htmlString = new NSString ("<p style=\"color:gray\">" +
        "\"http://itunes.apple.com/gb/app/paragraft/id412998778?mt=8\"; 
Paragraft" +
        "<br><em>Less than a word processor, more than plain text</em>");
        
NSMutableDictionary resourceDictionary = new NSMutableDictionary ();
resourceDictionary.Add (new NSString ("WebResourceData"),
                htmlString.Encode (NSStringEncoding.UTF8));
resourceDictionary.Add (new NSString ("WebResourceFrameName"), new
NSString (""));
resourceDictionary.Add (new NSString ("WebResourceMIMEType"), new
NSString ("text/html"));
resourceDictionary.Add (new NSString ("WebResourceTextEncodingName"),
new NSString ("UTF-8"));
resourceDictionary.Add (new NSString ("WebResourceURL"), new NSString
("about:blank"));
        
NSDictionary containerDictionary = NSDictionary.FromObjectsAndKeys (
                new object [] {resourceDictionary},
                new object [] {new NSString ("WebMainResource")});

NSDictionary htmlItem = NSDictionary.FromObjectsAndKeys (
                new object [] {containerDictionary},
                new object [] {htmlType});

pasteboard.AddItems (new NSDictionary [] {htmlItem});


On Fri, May 11, 2012 at 8:11 PM, jasonpeixoto <[email protected]> wrote:
> Please help, this is the last thing to complete a project I am late for. My
> boss is on my head. If someone can translate the objective-c to C#.
>
> Thank you and please.
>
> --
> View this message in context: 
> http://monotouch.2284126.n4.nabble.com/copy-html-into-clipboard-to-paste-into-mail-program-tp4623095p4627876.html
> Sent from the MonoTouch mailing list archive at Nabble.com.
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to