Thursday, April 10, 2014

Devexpress WPF how to make Buttons

In case you were wondering where ordinary buttons went in devexpress for WPF, here is an example of how to make one.

First, make sure to set the dxe namespace:

xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" 

then:

<dxe:ButtonEdit Height="23" Margin="195,137,0,0" Width="75" ShowText="False" AllowDefaultButton="False">
 <dxe:ButtonInfo Content="Cancel" Click="btnBack_Click" />
</dxe:ButtonEdit>

Wednesday, April 2, 2014

Devexpress WPF Gridview: set row cell font size

Quite simple, even though I couldn't find anything on that matter. Here's a complete example, giving you can locate the automatically created TableView element in your XAML:

<dxg:TableView Name="tableView1" 
   ShowGroupPanel="False" 
   NavigationStyle="Row" >
 <dxg:TableView.CellStyle>
  <Style>
   <Setter Property="TextElement.FontSize" Value="8" />
  </Style>
 </dxg:TableView.CellStyle>
</dxg:TableView>