Async Await in Windows apps for UX

17 בJuly 2015

Asynchronous programing can help us to improve better User Experience Like on next scenario: You got list of items , now every selection on any list items made some IO operation or complex validation on server or whatever. You can easily solve it out with async operation. View: <ListBox IsSynchronizedWithCurrentItem="True" ItemsSource="{Binding Data}" SelectedValue="{Binding MyProperty, UpdateSourceTrigger=PropertyChanged}" /> ViewModel: public List<string> Data { get { return new List<string>() { "aa", "bb", "cc", "dd", "ee" }; } } public object...
אין תגובות

ADV. Xaml Programing part 2 – binding to Methods

2 בJuly 2015

Usually binding has been designed for properties, But there is exceptional cases of course, generally not because of yours architecture but because others, The point is that is possible, Let’s start with ObjectDataProvider . it is an old trick to represents data in xaml endpoint, And make the things shorter, In this case we just define a Xaml reference to the class who hold the desired function For Example : public static class HelperBinding { public static string Test() { ...