RadHtmlPlaceholder Events
One of the important custom events that RadHtmlPlaceholder exposes is the UrlLoaded event. This event occurs as soon as the external url that is set as a source is loaded.
<UserControl x:Class="RadHtmlPlaceholderDemo.Page"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
Width="700"
Height="400">
<Grid x:Name="LayoutRoot"
Margin="10"
Background="White">
<Border BorderBrush="Black" BorderThickness="1">
<telerik:RadHtmlPlaceholder x:Name="RadHtmlPlaceholder1"
SourceUrl="http://www.bing.com"
UrlLoaded="RadHtmlPlaceholder_UrlLoaded" />
</Border>
</Grid>
</UserControl>
using System;
using System.Windows;
using System.Windows.Controls;
namespace RadHtmlPlaceholderDemo
{
public partial class Page : UserControl
{
public Page()
{
InitializeComponent();
}
private void RadHtmlPlaceholder_UrlLoaded(object sender, EventArgs e)
{
string message = string.Format("{0} has been loaded!", RadHtmlPlaceholder1.SourceUrl);
MessageBox.Show(message);
}
}
}
Imports System.Windows
Imports System.Windows.Controls
Namespace RadHtmlPlaceholderDemo
Partial Public Class Page
Inherits UserControl
Public Sub New()
InitializeComponent()
End Sub
Private Sub RadHtmlPlaceholder_UrlLoaded(ByVal sender As Object, ByVal e As EventArgs)
Dim message As String = String.Format("{0} has been loaded!", RadHtmlPlaceholder1.SourceUrl)
MessageBox.Show(message)
End Sub
End Class
End Namespace