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
1735
PropertyItemValueChanging issue with custom editors
posted

Hi,

when using a custom editor with the xamPropertyGrid (version 2015.2), the behavior of the PropertyItemValueChanging event looks to be wrong. The default sequence of events are:
- PropertyItemValueChanging raised
- Property updated
- PropertyItemValueChanged raised

When using a custom editor, I get this sequence of events:
- Property updated
- PropertyItemValueChanging raised
- PropertyItemValueChanged raised

i.e. the property is updated prior to the 'changing' event being raised. This is an error according to both the documentation and my understanding of the desired/obvious behavior.

Sample code:

<ig:XamPropertyGrid x:Name="propertyGrid"
                    SelectedObjects="{Binding SelectionManager.Selection, Converter={StaticResource SelectionConverter}}"
                    OptionsMenuVisibility="Collapsed"
                    DescriptionAreaVisibility="Collapsed"
                    FilterAreaVisibility="Collapsed">
  <ig:XamPropertyGrid.EditorDefinitions>
    <ig:PropertyGridEditorDefinition TargetType="system:String">
      <ig:PropertyGridEditorDefinition.EditTemplate>
        <DataTemplate>
          <TextBox Background="LightBlue"
                   Text="{Binding Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
        </DataTemplate>
      </ig:PropertyGridEditorDefinition.EditTemplate>
    </ig:PropertyGridEditorDefinition>
  </ig:XamPropertyGrid.EditorDefinitions>
</ig:XamPropertyGrid>

Regards,
Leif

Parents
No Data
Reply
  • 1990
    posted

    Hello Leif,

    Thanks for your post.

    I created the following case for you: 'CAS-165548-R8Z4J6" and will update you through it. You could see it in your account in the 'Support Activity' page.

    Sincerely,

    Horen

    Software Developer

    Infragistics

Children
No Data