Class CloudUploadFile
Class that contains logic for uploading a file, tracking upload progress and upload cancelation.
Inheritance
Namespace: Telerik.Windows.Cloud.Controls.Upload
Assembly: Telerik.Windows.Cloud.Controls.dll
Syntax
public sealed class CloudUploadFile : Object, INotifyPropertyChanged
Constructors
CloudUploadFile(String, Stream, List<Object>)
Initializes a new instance of the CloudUploadFile class.
Declaration
public CloudUploadFile(string fileName, Stream fileStream, List<object> validationErrors = null)
Parameters
System.String
fileName
|
System.IO.Stream
fileStream
|
System.Collections.Generic.List<System.Object>
validationErrors
|
Properties
FileName
The short file name.
Declaration
public string FileName { get; }
Property Value
System.String
|
FileSize
The file size.
Declaration
public long FileSize { get; }
Property Value
System.Int64
|
Provider
The cloud upload provider.
Declaration
public ICloudUploadProvider Provider { get; set; }
Property Value
ICloudUploadProvider
|
RequestCancelCommand
A command that requests a cancel when executed.
Declaration
public ICommand RequestCancelCommand { get; }
Property Value
System.Windows.Input.ICommand
|
RequestCloseCommand
A command that raises the CloseRequested event.
Declaration
public ICommand RequestCloseCommand { get; }
Property Value
System.Windows.Input.ICommand
|
StartUploadCommand
A command that starts the file upload.
Declaration
public ICommand StartUploadCommand { get; }
Property Value
System.Windows.Input.ICommand
|
State
The state of the upload.
Declaration
public CloudUploadFileState State { get; }
Property Value
CloudUploadFileState
|
UploadedBytes
The uploaded bytes count.
Declaration
public long UploadedBytes { get; }
Property Value
System.Int64
|
UploadResult
The result of the upload.
Declaration
public object UploadResult { get; }
Property Value
System.Object
|
ValidationErrors
The validation errors.
Declaration
public List<object> ValidationErrors { get; }
Property Value
System.Collections.Generic.List<System.Object>
|
Methods
RequestCancel()
Requests a cancellation for the upload.
Declaration
public void RequestCancel()
RequestClose()
StartUpload()
Starts the file upload.
Declaration
public void StartUpload()
Events
CloseRequested
Occurs when a close is requested.
Declaration
public event EventHandler CloseRequested
Event Type
System.EventHandler
|
ProgressChanged
Occurs when the upload progress changes.
Declaration
public event EventHandler ProgressChanged
Event Type
System.EventHandler
|
PropertyChanged
Occurs when a property value changes.
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
System.ComponentModel.PropertyChangedEventHandler
|
StartUploadRequested
Occurs when starting an upload is requested.
Declaration
public event EventHandler<StartUploadRequestedEventArgs> StartUploadRequested
Event Type
System.EventHandler<StartUploadRequestedEventArgs>
|
StateChanged
Occurs when the state changes.
Declaration
public event EventHandler<CloudUploadFileStateChangedEventArgs> StateChanged
Event Type
System.EventHandler<CloudUploadFileStateChangedEventArgs>
|