GdPicture.NET.14
GdPicture14.WPF Namespace / GdViewer Class / DataReceived Event
Example





In This Topic
DataReceived Event (GdViewer)
In This Topic
This event is raised right after the packet of the specified size has been successfully transferred during loading or saving a file using HTTP or FTP transfer.

The event makes use of bubble routing strategy. Please check the corresponded GdViewer.DataReceivedEventArgs for given parameters.

Syntax
'Declaration
 
Public Event DataReceived As GdViewer.DataReceivedHandler
public event GdViewer.DataReceivedHandler DataReceived
public event DataReceived: GdViewer.DataReceivedHandler; 
In JScript, you can handle the events defined by another class, but you cannot define your own.
public: __event GdViewer.DataReceivedHandler* DataReceived
public:
event GdViewer.DataReceivedHandler^ DataReceived
Event Data

The event handler receives an argument of type GdViewer.DataReceivedEventArgs containing data related to this event. The following GdViewer.DataReceivedEventArgs properties provide information specific to this event.

PropertyDescription
(Inherited from System.Windows.RoutedEventArgs)
(Inherited from System.Windows.RoutedEventArgs)
The percentage of the already transferred data.  
(Inherited from System.Windows.RoutedEventArgs)
The total size of the data left for transferring, in bytes.  
(Inherited from System.Windows.RoutedEventArgs)
The total size of the data to transfer, in bytes.  
Remarks
Just to inform you that you can change the packet size used for transferring data by the SetHttpTransferBufferSize method.
Example
How to utilize this event in your GdViewer control.
'We assume that the GdViewer1 control has been properly integrated
'and the DataReceived event has been properly added.
            
'Define the event.
Sub GdViewer1_DataReceived(ByVal sender As Object, ByVal e As GdPicture14.WPF.GdViewer.DataReceivedEventArgs)
    'Do your stuff here.
End Sub
//We assume that the GdViewer1 control has been properly integrated
//and the DataReceived event has been properly added.
            
//Define the event.
void GdViewer1_DataReceived(object sender, GdPicture14.WPF.GdViewer.DataReceivedEventArgs e)
{
    //Do your stuff here.
}
See Also