Example #1
0
 private void SelectionChanged(object sender, EventArgs args)
 {
     if (Active)
     {
         if (TabControl.Selected != null)
         {
             SetActive((IBaseNotebookPage)TabControl.Selected.Tag);
         }
         else
         {
             SetActive(null);
         }
         if (OnActivePageChange != null)
         {
             OnActivePageChange.Execute(this, new EventParams());
         }
     }
 }
Example #2
0
        /// <remarks> This callback method is invoked on the main thread. </remarks>
        private void SelectionChanged(object sender, SelectionChangedEventArgs args)
        {
            var newItem = args.AddedItems.Count == 0 ? null : args.AddedItems[0];

            Session.Invoke
            (
                (System.Action)
                (
                    () =>
            {
                if (Active)
                {
                    SetActive(FindPage(newItem));
                    if (OnActivePageChange != null)
                    {
                        OnActivePageChange.Execute(this, new EventParams());
                    }
                }
            }
                )
            );
        }