Creating Line of Business applications using DevExpress WPF controls is just a breeze. The actual application is nice looking too! Since there are a couple of skins available and the good thing is the skin also changes the look and feel of standard WPF controls!

I’ve used my calendar library to develop a fully localizable solution. These controls support Gregorian, Hijri and Persian calendars so multicultural application development would be seamless, but the look and feel of my controls were a lot different than the ones provided by DevExpress. On the other hand, DevExpress only supports Gregorian calendar! So I needed to apply look and feel of DevExpress to my controls. It goes without saying that you can open the controls in Expression Blend and give it a style that mimics DevExpress look and feel, but that is not easy to do.

DevExpress provides a PopupEditBase control that can be used to display any control as a Popup. That seemed to be a good choice and it was easy to create a new control all in xaml markup:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<Window x:Class="DXCustomEditor.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:fx="http://schemas.s.ir/wpf/2008/FarsiLibrary"
Title="DX Editors" Height="350" Width="525"
xmlns:loc="clr-namespace:DXCustomEditor">
<Window.Resources>
<loc:DateConverter x:Key="DateConverter"/>
<ControlTemplate x:Key="DatePickerTemplate">
<fx:FXMonthView SelectedDateTime="{Binding Path=(dxe:BaseEdit.OwnerEdit).EditValue, Mode=TwoWay, RelativeSource={RelativeSource Mode=TemplatedParent}, Converter={StaticResource DateConverter}}"/>
</ControlTemplate>
</Window.Resources>
<StackPanel Margin="10">
<dxe:PopupBaseEdit IsTextEditable="False" PopupContentTemplate="{StaticResource ResourceKey=DatePickerTemplate}" />
</StackPanel>
</Window>

The outcome is pretty good: seamless calendar support and look and feel.

Result