Hi,
I am generating a GridColumn within a DataTemplate("MyCellTemplate") as follows.
<DataTemplate x:Key="MyCellTemplate"><ContentControl><dxg:GridColumn FieldName="{Binding ColumnIdentifier}"
Header="{Binding DisplayText}" Width="50" AllowColumnFiltering="False" UnboundType="Boolean"><dxg:GridColumn.CellTemplate><DataTemplate><ToggleButton IsChecked="{Binding Value,Converter={StaticResource ShortToBooleanConverter}, Mode=TwoWay}" Checked="ToggleButton_Checked_Changed" Unchecked="ToggleButton_Checked_Changed"><ToggleButton.Template><ControlTemplate TargetType="ToggleButton"><Border Name="border" Background="LightGray" /><ControlTemplate.Triggers><Trigger Property="IsChecked" Value="True"><Setter Property="Background" Value="Green" TargetName="border" /></Trigger></ControlTemplate.Triggers></ControlTemplate></ToggleButton.Template></ToggleButton><!--<TextBlock Text="{Binding Value}" FontSize="8" Background="LightGray"/>--></DataTemplate></dxg:GridColumn.CellTemplate></dxg:GridColumn></ContentControl></DataTemplate>
Issue is when i use the converter: "ShortToBooleanConverter" it throws NullReference exception at:
System.Windows.Markup.IStyleConnector.Connect(Int32 connectionId, Object target) .
I researched online and found that there is some bug with .NET 4.0 when there is a combination of static resource and event handler with in a template. So please suggest why i get this error and what is the solution for it.