Problem with Int32EditBox in FlowDocument

Editors for WPF Forum

Posted 10 years ago by David Mullin
Version: 9.2.0515
Platform: .NET 3.5
Environment: Windows 7 (64-bit)
Avatar
I have a UserControl which contains an Int32EditBox. This UserControl is contained within a BlockUIContainer inside a FlowDocument in Page mode. If I type something into the Int32EditBox and hit the "Next Page" button on the FlowDocumentReader without first moving the focus from the Int32EditBox control, when I page back, the contents are lost. If I replace the Int32EditBox with a normal TextBox, the contents are not lost.

I have a simple reproduction which I can provide of this.

David Mullin
IMA Technologies

Comments (1)

Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi David,

Looks like the IsKeyboardFocusWithinChanged event is firing for the Part after it or it's parent has been unloaded. This event, along with the MaskedTextBox.LostFocus event, are used to "pass" the value up to the Int32EditBox from the part. But, that's not happening due to how the flow document is doing things.

You can alter the behavior of the Int32EditBox to work more like the TextBox though. If you set PartValueCommitTriggers to All, then it will "commit" (i.e. pass them up to the Int32EditBox from the part) value changes as you type, which is effectively what the TextBox does.


Actipro Software Support

The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.