Suppose you need to bind ItemsSource dependency property to enum's values. For example in ComboBox. You have following enum: public enum ExampleEnum { Red, Green, Yellow } Now you can use ObjectDataProvider <Window x:Class="ExampleApplication.Window" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:System="clr-namespace:System;assembly=mscorlib" xmlns:local="clr-namespace...
Compare performace of WPF Converters, DataTriggers and Direct Binding

Hello, I have made some performance tests with DataTriggers and Converters. For testing purposes I have chosen Visibility property. In first case I have binded Visibility property to IsVisible view model boolean property with standard BooleanToVisibilityConverter converter. <Border Visibility="{Binding IsVisible, Converter={StaticResource BooleanToVisibilityConverter}}" Background="Blue" /> Next case was written with DataTrigger <Border Background="Red">...
WPF Binding examples
I have found very nice WPF XAML Data Binding Cheat Sheet, so I'll just leave it here for further use. Basic Binding {Binding} Bind to current DataContext. {Binding Name} Bind to the “Name” property of the current DataContext. {Bindind Name.Length} Bind to the Length property of the object in the Name property of the current DataContext. {Binding ElementName=SomeTextBox, Path=Text} Bind to the “Text” property of the element XAML element with name=”SomeTextBox” or x:Name=”SomeTextBox”. XML Binding...
Оптимизации в WPF MultiDataTrigger
Использовал я однажды MultiDataTrigger в WPF приложении, и стало мне интересно а применяется ли для условий оптимизация на подобии оператора && в C#, когда второй операнд вычисляется только если первый равен true. Напомню, для того что бы сработал MultiDataTrigger необходиом выполнение всех условий заданных в блоке Conditions: <Style TargetType="Grid"> <Setter Property="Background" Value="MediumAquamarine" /> <Style.Triggers> <MultiDataT...
HomeMoney for Windows 8 minor release

Состоялся минорный релиз HomeMoney - приложение для учета расходов, интегрированное с популярным онлайн сервисом домашней бухгалтерии homemoney.ua - онлайн сервисом для оптимизации расходов, планирования затрат и ведения бюджета. В данном релизе: Исправлена ошибка с отображением имен счетов\категорий которые содержат кавычки. Добавлена английская локализация Установить приложение можно в Windows 8 Store
Публикация приложения в Windows 8 store

Добрый день, После успешной публикации приложения, в разработке которого я принимал непосредственное участие, хотел поделиться приобретенным опытом, может кому-то будет полезно. Лирическое отступление: Приложение - клиент для онлайн сервиса домашней бухгалтерии homemoney.ua Первая версия приложения умеет вносить расходы за сегодня, посматривать остатки на счетах и количество потраченных денег за месяц по конкретным категориям. В интернете уже есть множество статей на данную тематику, например н...
[WinRT] Binding ListView to CollectionViewSource in design time
![[WinRT] Binding ListView to CollectionViewSource in design time [WinRT] Binding ListView to CollectionViewSource in design time](http://www.logodesignlove.com/images/evolution/windows-8-logo.jpg)
It would be really useful if you could see all binded data in design time in VisualStudio or Blend. To do this you should set page DataContext in xaml: <Page.DataContext> <viewModels:MainPageViewModel /> </Page.DataContext> In this case you will use the same ViewModel for design and run time. If ViewModel require different data loading logic for design and run time you should use Windows.ApplicationModel.DesignMode.DesignModeEnabled in ViewModel constructor to determine in witc...