protected override void AddItems(NCommandBarItemCollection items)
            {
                // Add the "Add Appointment" button
                items.Add(CreateButton(Nevron.Nov.Schedule.NResources.Image_Edit_AddAppointment_png, NScheduleView.AddAppointmentCommand));

                // Add the custom command button
                items.Add(CreateButton(NResources.Image_Ribbon_16x16_smiley_png, CustomCommand));
            }
예제 #2
0
            protected override void AddItems(NCommandBarItemCollection items)
            {
                // Add the "Copy" button
                items.Add(CreateButton(Nevron.Nov.Presentation.NResources.Image_Edit_Copy_png, NDrawingView.CopyCommand));

                // Add the custom command button
                items.Add(CreateButton(NResources.Image_Ribbon_16x16_smiley_png, CustomCommand));
            }
예제 #3
0
        private void CloseExample()
        {
            NExampleBase oldExample = m_Splitter.Pane2.Content as NExampleBase;

            if (oldExample != null)
            {
                // Notify the old example that it is about to be closed
                oldExample.OnClosing();
            }

            m_Splitter.Pane2.Content = null;

            // Remove the current breadcrumb
            if (m_Toolbar != null)
            {
                NCommandBarItemCollection items = m_Toolbar.Items;
                for (int i = items.Count - 1; i >= 2; i--)
                {
                    m_Toolbar.Items.RemoveAt(i);
                }
            }
        }
예제 #4
0
        private void OnToggleButtonCheckedChanged(NValueChangeEventArgs arg)
        {
            NToggleButton button = arg.CurrentTargetNode as NToggleButton;

            if (button == null)
            {
                return;
            }

            //Get the toolbar items collection and enable or disable the next button in the collection
            NCommandBarItemCollection toolbarItems = button.ParentNode as NCommandBarItemCollection;

            if (toolbarItems == null)
            {
                return;
            }

            int buttonIndex = toolbarItems.IndexOfChild(button);
            NFillSplitButton fillSplitButton = toolbarItems[buttonIndex + 1] as NFillSplitButton;

            if (fillSplitButton == null)
            {
                return;
            }

            if (button.Checked)
            {
                fillSplitButton.Enabled       = true;
                ((NLabel)button.Content).Text = "Disable";
            }
            else
            {
                fillSplitButton.Enabled       = false;
                ((NLabel)button.Content).Text = "Enable";
            }
        }