c# - WPF - Knowing which control will end up with focus -
i've been playing around events in wpf , have far i've got mileage out of 'source' , 'originalsource' properties of event args using sending control , focusmanager. here's thing, when chain of events starts firing, there way know control ending focus @ end barring intervening logic throughout chain of events?
i'm afraid reliable way of doing letting focus change , handling in previewgotkeyboardfocus
handler @ top view level.
you can know control going focus, , cancel change e.handled = true
.
pd. there's function in uielements called predictfocus
, works positional traverse changes, not tab-based changes (or custom focusing).
Comments
Post a Comment