private void OnSwitchUIButtonClick(NEventArgs arg)
        {
            NButton switchUIButton = (NButton)arg.TargetNode;
            NLabel  label          = (NLabel)switchUIButton.Content;

            // Remove the rich text view from its parent
            m_ScheduleView.ParentNode.RemoveChild(m_ScheduleView);

            if (label.Text == SwitchToRibbon)
            {
                // We are in "Command Bars" mode, so switch to "Ribbon"
                label.Text = SwitchToCommandBars;

                // Create the ribbon
                m_ExampleTabPage.Content = m_RibbonBuilder.CreateUI(m_ScheduleView);
            }
            else
            {
                // We are in "Ribbon" mode, so switch to "Command Bars"
                label.Text = SwitchToRibbon;

                // Create the command bars
                if (m_CommandBarBuilder == null)
                {
                    m_CommandBarBuilder = new NScheduleCommandBarBuilder();
                }

                m_ExampleTabPage.Content = m_CommandBarBuilder.CreateUI(m_ScheduleView);
            }
        }
        public override void Initialize()
        {
            base.Initialize();

            // Add the custom command action to the schedule view's commander
            m_ScheduleView.Commander.Add(new CustomCommandAction());

            // Remove the "Edit" menu and insert a custom one
            m_CommandBarBuilder = new NScheduleCommandBarBuilder();
            m_CommandBarBuilder.MenuDropDownBuilders.Remove(NScheduleCommandBarBuilder.MenuEditName);
            m_CommandBarBuilder.MenuDropDownBuilders.Insert(1, new CustomMenuBuilder());

            // Remove the "Standard" toolbar and insert a custom one
            m_CommandBarBuilder.ToolBarBuilders.Remove(NScheduleCommandBarBuilder.ToolbarStandardName);
            m_CommandBarBuilder.ToolBarBuilders.Insert(0, new CustomToolBarBuilder());

            // Remove the schedule view from its parent and recreate the command bar UI
            m_ScheduleView.ParentNode.RemoveChild(m_ScheduleView);
            m_ExampleTabPage.Content = m_CommandBarBuilder.CreateUI(m_ScheduleView);
        }