Class
CloudUploadFile

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:

cs-api-definition
public sealed class CloudUploadFile : INotifyPropertyChanged

Inheritance: objectCloudUploadFile

Implements: INotifyPropertyChanged

Constructors

CloudUploadFile(string, Stream, List<object>)

Initializes a new instance of the CloudUploadFile class.

Declaration

cs-api-definition
public CloudUploadFile(string fileName, Stream fileStream, List<object> validationErrors = null)

Parameters

fileName

string

fileStream

Stream

validationErrors

List<object>

Properties

FileName

The short file name.

Declaration

cs-api-definition
public string FileName { get; }

Property Value

string

FileSize

The file size.

Declaration

cs-api-definition
public long FileSize { get; }

Property Value

long

Provider

The cloud upload provider.

Declaration

cs-api-definition
public ICloudUploadProvider Provider { get; set; }

Property Value

ICloudUploadProvider

RequestCancelCommand

A command that requests a cancel when executed.

Declaration

cs-api-definition
public ICommand RequestCancelCommand { get; }

Property Value

ICommand

RequestCloseCommand

A command that raises the CloseRequested event.

Declaration

cs-api-definition
public ICommand RequestCloseCommand { get; }

Property Value

ICommand

StartUploadCommand

A command that starts the file upload.

Declaration

cs-api-definition
public ICommand StartUploadCommand { get; }

Property Value

ICommand

State

The state of the upload.

Declaration

cs-api-definition
public CloudUploadFileState State { get; }

Property Value

CloudUploadFileState

UploadResult

The result of the upload.

Declaration

cs-api-definition
public object UploadResult { get; }

Property Value

object

UploadedBytes

The uploaded bytes count.

Declaration

cs-api-definition
public long UploadedBytes { get; }

Property Value

long

ValidationErrors

The validation errors.

Declaration

cs-api-definition
public List<object> ValidationErrors { get; }

Property Value

List<object>

Methods

RequestCancel()

Requests a cancellation for the upload.

Declaration

cs-api-definition
public void RequestCancel()

RequestClose()

Raises the CloseRequested event.

Declaration

cs-api-definition
public void RequestClose()

StartUpload()

Starts the file upload.

Declaration

cs-api-definition
public void StartUpload()

Events

CloseRequested

Occurs when a close is requested.

Declaration

cs-api-definition
public event EventHandler CloseRequested

Event Value

EventHandler

ProgressChanged

Occurs when the upload progress changes.

Declaration

cs-api-definition
public event EventHandler ProgressChanged

Event Value

EventHandler

PropertyChanged

Occurs when a property value changes.

Declaration

cs-api-definition
public event PropertyChangedEventHandler PropertyChanged

Event Value

PropertyChangedEventHandler

Implements INotifyPropertyChanged.PropertyChanged

StartUploadRequested

Occurs when starting an upload is requested.

Declaration

cs-api-definition
public event EventHandler<StartUploadRequestedEventArgs> StartUploadRequested

Event Value

EventHandler<StartUploadRequestedEventArgs>

StateChanged

Occurs when the state changes.

Declaration

cs-api-definition
public event EventHandler<CloudUploadFileStateChangedEventArgs> StateChanged

Event Value

EventHandler<CloudUploadFileStateChangedEventArgs>