Silverlight / WPF - View HTML files in silverlight

Asked By gopal krish on 19-Apr-12 02:33 AM

hi..

how to View HTML files in silverlight?

via silverlight how to disable the right click option in html files? i.e)SL html viewer

is it possible to control right click option of the html file?

need ur suggestions with examples..

regards

gopal.s

Somesh Yadav replied to gopal krish on 19-Apr-12 04:55 AM
Here is the code:

using System.Windows;
using System.Windows.Controls;
using System.Windows.Browser;
using System.Net;

namespace gfcpaWebsite
{
  public partial class PopupWindow : ChildWindow
  {
    public PopupWindow()
    {
    InitializeComponent();
    }

    public void SetMessage(string theMessage)
    {
    Message.Text = theMessage;
    }

    private void OKButton_Click(object sender, RoutedEventArgs e)
    {
    this.DialogResult = true;
    }

    private void CancelButton_Click(object sender, RoutedEventArgs e)
    {
    this.DialogResult = false;
    }

    private void httpCallBTTN_Click(object sender, System.Windows.RoutedEventArgs e)
    {
    System.Windows.Browser.HtmlPage.Window.Navigate(new Uri("http://www.gfcpa.com"), "_blank", "toolbar=no,location=no,status=no,menubar=no,resizable=yes");
    }

  }
}