New to Telerik UI for WPFStart a free 30-day trial

Class that contains logic for uploading a file, tracking upload progress and upload cancelation.

Definition

Namespace:Telerik.Windows.Cloud.Controls.Upload

Assembly:Telerik.Windows.Cloud.Controls.dll

Syntax:

C#
public sealed class CloudUploadFile : INotifyPropertyChanged

Inheritance: objectCloudUploadFile

Implements: INotifyPropertyChanged

Constructors

Initializes a new instance of the CloudUploadFile class.

C#
public CloudUploadFile(string fileName, Stream fileStream, List<object> validationErrors = null)
Parameters:fileNamestringfileStreamStreamvalidationErrorsList<object>

Properties

The short file name.

C#
public string FileName { get; }

The file size.

C#
public long FileSize { get; }

The cloud upload provider.

C#
public ICloudUploadProvider Provider { get; set; }

A command that requests a cancel when executed.

C#
public ICommand RequestCancelCommand { get; }

A command that raises the CloseRequested event.

C#
public ICommand RequestCloseCommand { get; }

A command that starts the file upload.

C#
public ICommand StartUploadCommand { get; }

The state of the upload.

C#
public CloudUploadFileState State { get; }

The uploaded bytes count.

C#
public long UploadedBytes { get; }

The result of the upload.

C#
public object UploadResult { get; }

The validation errors.

C#
public List<object> ValidationErrors { get; }

Methods

Requests a cancellation for the upload.

C#
public void RequestCancel()

Raises the CloseRequested event.

C#
public void RequestClose()

Starts the file upload.

C#
public void StartUpload()

Events

Occurs when a close is requested.

C#
public event EventHandler CloseRequested

Occurs when the upload progress changes.

C#
public event EventHandler ProgressChanged

Occurs when a property value changes.

C#
public event PropertyChangedEventHandler PropertyChanged

Implements: INotifyPropertyChanged.PropertyChanged

Occurs when starting an upload is requested.

C#
public event EventHandler<StartUploadRequestedEventArgs> StartUploadRequested

Occurs when the state changes.

C#
public event EventHandler<CloudUploadFileStateChangedEventArgs> StateChanged