Your SlideShare is downloading. ×

Html bridge

1,601

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,601
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. HTML Bridge
    Mahender
    Senior Software Engineer
    United Health Group
  • 2. Mahender Sarangam
    Having 5 years of experience on .NET Technologies. Working as a Senior Software Engineer in United Health Group (UHG India Information Service Ltd.). Worked with Big Firms like Deloitte Consulting & Wipro Technology.
    Got Technical Acquaintance on Technologies like C#, ASP.NET,AJAX, LINQ, Silverlight, WPF,WCF ,SQL Server, Team Foundation Server(TFS) and SharePoint Technology.
    MCTS Certified in Web Technologies.
    Blog : http://Msarangam.wordpress.com
  • 3. HTML Bridge
    • HTML Bridge is a technology in Silverlight that enables you to access the HTML Document Object Model (DOM) from managed code, and to call managed code from JavaScript
    • 4. Why do I need HTML Bridge?
    • 5. Ability to interop between both the Silverlight and JavaScript in the browser. Since Silverlight run within Object tag of an HTML, there should be way of communicating HTML Dom with Silverlight or We would commonly use HTML Bridge to transfer information, such as events, types and data.
    Note: The Silverlight plug-in does not need to have a visible UI to access the underlying DOM of the page
  • 6. What are feature that HTML Bridge Provide
    Attach Silverlight managed event handlers to HTML controls
    Expose complete managed types to JavaScript for scripting like properties in Code Behind
    Use managed containers for DOM elements such as window, document, and standard HTML elements
    Pass managed types as parameters to JavaScript functions and objects
    Return managed types from JavaScript
    Control various security aspects of your Silverlight-based application
    Attach JavaScript event handlers to Silverlight controls
  • 7. Managed Attributes
    ScriptableTypeAttribute : - Marks a property, method or event accessible to JavaScript. ScriptableMemberAttribute Marks all public properties, methods, and events on a managed type accessible to JavaScript when registered using the RegisterCreateableType method.
  • 8. using System.Windows.Browser;
    [ScriptableTypeAttribute]
    public class Person
    {
    [ScriptableMemberAttribute]
    public string Name{ get; set; }
    [ScriptableMemberAttribute]
    public event EventHandlerregisteredEvent;
    [ScriptableMemberAttribute]
    public double FullName()
    {
    ////
    }
    }
  • 9. Thank you

×