Is there an event that gets sent when a pane is pined/unpinned? I have several windows that I would like to "disable" when they are pined and re-enable when they are pinned. I would also be interested in an event that gets sent when the panel is revealed; i.e., when it slides out from the pined area to allow the user to pin it.
There currently isn't an event specific to pinning/unpinning. You could bind to the pane's IsPinned state to know when it has changed. With regards to when the UnpinnedTabFlyout is displayed, there is no event associated with this action. You should submit a suggestion for adding these events.
I have entered the suggestion.
In the meantime could you elaborate on "bind to the pane's IsPinned state"? I thought that there had to be a PropertyChangeEvent for me to connect to in order to be notified of the change? I am using Infragistics.Windows.DockManager.ContentPane which does not seem to support a property changed event. I looked into using a trigger but once again ran into the requirment of a notifying event. Of course I could be misreading the whole thing, in which case I would welcome guidance.
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;} Thanks. That worked great! I was able to implement the suggested attached behavior for pinned and unpinned events. Now I have been told I also need to catch Flyout and FlyIn events - when the window pops out to allow the user to pin it and when the user unpins it and it slides back over to the tab. I see where I can specify a flyout type but is there a similar thing on XamlDockmanager that can be used to raise fly events?
No there isn't any information specific to those actions currently exposed. You should submit a suggestion and include as much detail about the requirements as possible.
I have just implemented your suggestion also but had a slight problem.
The Pinned and Unpinned events did not appear for the ContentPaneEvents (I got the error "The property ContentPaneEvents.Pinned does not exist in XML namespace..." when compiling)
However, I resolved the problem by changing
public static void AddPinnedHandler(UIElement element, RoutedEventHandler handler) { element.AddHandler(PinnedEvent, handler); }
to:
public static void AddPinnedHandler(DependencyObject d, RoutedEventHandler handler) { (UIELement)d).AddHandler(PinnedEvent, handler); }
and repeating the same change for RemovePinnedHandler, AddUnpinnedHandler and RemoveUnpinnedHandler.
Thanx.
how would this work for a ContentPane created dynamically?
so ContentPane pane = new ContentPane();
I've tried ContentPaneEvents.AddPinnedHandler(pane, OnPanePinned);
but the event doens't seem to fire when the pane is pinned/unpinned
Just as in the xaml case you still have to set the RaisePinEvents (e.g. "ContentPaneEvents.SetRaisePinnedEvents(pane, true)" ).
yeah noticed that a few minutes later :)
Thanks