Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
110
Custom CellValuePresenter Style = no Events ?
posted

Hi,

 When using a custom CellValuePresenter style on my grid, the edit events, and tab functions have all stopped working. The custom style is working as expected, but has lost its default events.

Help !

The style is as follows:

<Style x:Key="cellValidationStyle" TargetType="{x:Type igDP:CellValuePresenter}">  
  
  <Setter Property="Template">
   <Setter.Value>
    <ControlTemplate TargetType="{x:Type igDP:CellValuePresenter}">  
     
     <StackPanel>  
      <Grid Width="Auto" Height="Auto">  
       <!--<TextBox Text="{Binding Path=Value, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Margin="5,0,139,12" Width="Auto" Height="Auto" MinWidth="300"/>-->
              
       <igEditors:XamTextEditor Value="{Binding Path=Value, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"/>
       
       <Image x:Name="ErrorIcon"
        Height="15" Source="erricon.gif" Visibility="Hidden" VerticalAlignment="Top" RenderTransformOrigin="7.776,0.215" HorizontalAlignment="Right" Margin="0,1.852,120.175,0" Width="15"/> 
    
      </Grid> 
    
     </StackPanel>
          
     <ControlTemplate.Triggers>
                        <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=Record, Converter={StaticResource validationErrorConverter}}" Value="False">

                            <Setter Property="Visibility"
                                    TargetName="ErrorIcon"
                                    Value="Visible" />
         
                        </DataTrigger>
                     </ControlTemplate.Triggers>
     
             
    </ControlTemplate>
   </Setter.Value>
  </Setter>    
  
 </Style>