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
385
XamCheckEditor Styling Issue
posted

I replaced the template of a CellValuePresenter, and added a CheckBox as my template,

I did this in order to receive change events when the user checks/unchecks rather than having to

move to a new row.

This is what I have:

<ig:FieldSettings.CellValuePresenterStyle>

<

 

Style TargetType="{x:Type ig:CellValuePresenter}">

<Setter Property="Template">

<Setter.Value>

<ControlTemplate>

<CheckBox HorizontalAlignment="Center" VerticalAlignment="Center"

IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content}"/>

</

 

ControlTemplate>

</Setter.Value>

</Setter>

</Style>

</ig:FieldSettings.CellValuePresenterStyle>

So, this solved my problem of receiving the events in a timely fashion, But, I am having problems with

Keyboard interaction, If I tab into a field which uses the above style, the checkbox doesn't have the focus

instead the focus is on the cell value presenter. How do I make this work?

Parents
  • 69686
    posted

    Instead of retemplating the CellValuePresenvet to go around this, you can just handle the ValueChanged event of the checkbox (either with EventSetter in a style or with the EventManager.RegisterClassHandler() method) and force the editor to end its edit mode by calling its EndEditMode() method.

Reply Children