Skip to content

DevExpress-Examples/wpf-mvvm-framework-functionbindingbehavior

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WPF MVVM Framework - FunctionBindingBehavior

The FunctionBindingBehavior allows you to use a ViewModel function to calculate a control property. The example uses this behavior to bind the ChartControl to the GetFilteredItems function and pass SelectionRangeStart and SelectionRangeEnd properties of the RangeControl to the function.

image

public IList<DataItem> GetFilteredItems(DateTime start, DateTime end) {
    return this.Points.Where(x => x.Date.Date >= start && x.Date.Date <= end).OrderByDescending(x => x.ValueSummary).ToList();
}

Files to Review

Documentation