Reputation: 397
I have a DatePicker
on a Page
and would like to know whenever the DatePickerFlyout
associated with the DatePicker
is opened. This would be straightforward if I had a reference to the relevant DatePickerFlyout
(DatePickerFlyout
has Opened
and Opening
events) , but I can't seem to find one.
Flyout
s (Popup
s) appear in the Visual Tree
under PopupRoot
so I thought I might listen for changes in the PopupRoot
branch. But walking up the tree stops at the RootScrollViewer
, one level below PopupRoot
, so I can't reference that branch.
VisualTreeHelper.GetOpenPopupsForXamlRoot()
returns a list of open Popup
s (which includes Flyout
s) but only if the Flyout
in question is actually open.
Any idea how I can find and work with the actual DatePickerFlyout
object?
Thank you in advance.
Upvotes: 0
Views: 130