Back to Devexpress

GetUniqueValuesAsyncEventArgs.Result Property

wpf-devexpress-dot-xpf-dot-data-dot-getuniquevaluesasynceventargs.md

latest4.5 KB
Original Source

GetUniqueValuesAsyncEventArgs.Result Property

Gets or sets the result of the get unique values operation (only values).

Namespace : DevExpress.Xpf.Data

Assembly : DevExpress.Xpf.Core.v25.2.dll

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public Task<object[]> Result { get; set; }
vb
Public Property Result As Task(Of Object())

Property Value

TypeDescription
Task<Object[]>

A task that returns the result of the get unique values operation.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the Result property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-data-grid-bind-to-custom-service-with-restrictions/CS/MainWindow.xaml.cs#L28

csharp
source.GetUniqueValues += (o, e) => {
    e.Result = GetUniqueValuesAsync(e.PropertyName);
};

wpf-data-grid-bind-to-pagedasyncsource/CS/PagedAsyncSourceSample/MainWindow.xaml.cs#L29

csharp
var values = Enum.GetValues(typeof(Priority)).Cast<object>().ToArray();
    e.Result = Task.FromResult(values);
} else {

wpf-data-grid-use-virtual-sources-to-bind-to-in-memory-data/CS/MainWindow.xaml.cs#L39

csharp
if(e.PropertyName == "Priority") {
    e.Result = Task.FromResult(Enum.GetValues(typeof(Priority)).Cast<object>().ToArray());
} else {

wpf-data-grid-bind-to-infiniteasyncsource/CS/InfiniteAsyncSourceSample/MainWindow.xaml.cs#L29

csharp
var values = Enum.GetValues(typeof(Priority)).Cast<object>().ToArray();
    e.Result = Task.FromResult(values);
} else {

wpf-data-grid-bind-to-custom-service-with-restrictions/VB/MainWindow.xaml.vb#L20

vb
AddHandler source.FetchRows, Sub(o, e) e.Result = FetchRowsAsync(e)
AddHandler source.GetUniqueValues, Sub(o, e) e.Result = GetUniqueValuesAsync(e.PropertyName)
Me.grid.ItemsSource = source

wpf-data-grid-bind-to-pagedasyncsource/VB/PagedAsyncSourceSample/MainWindow.xaml.vb#L22

vb
Dim values = [Enum].GetValues(GetType(Priority)).Cast(Of Object)().ToArray()
    e.Result = Task.FromResult(values)
Else

wpf-data-grid-use-virtual-sources-to-bind-to-in-memory-data/VB/MainWindow.xaml.vb#L24

vb
If Equals(e.PropertyName, "Priority") Then
    e.Result = Task.FromResult([Enum].GetValues(GetType(Priority)).Cast(Of Object)().ToArray())
Else

See Also

GetUniqueValuesAsyncEventArgs Class

GetUniqueValuesAsyncEventArgs Members

DevExpress.Xpf.Data Namespace