Ejemplo n.º 1
0
        protected override NWidget CreateExampleControls()
        {
            NStackPanel stack = new NStackPanel();

            stack.FillMode = ENStackFillMode.Last;
            stack.FitMode  = ENStackFitMode.Last;

            // Create the properties group box
            NStackPanel             propertiesStack = new NStackPanel();
            NList <NPropertyEditor> editors         = NDesigner.GetDesigner(m_ListBox).CreatePropertyEditors(m_ListBox,
                                                                                                             NListBox.EnabledProperty,
                                                                                                             NListBox.HorizontalPlacementProperty,
                                                                                                             NListBox.VerticalPlacementProperty
                                                                                                             );

            for (int i = 0, count = editors.Count; i < count; i++)
            {
                propertiesStack.Add(editors[i]);
            }

            NPropertyEditor editor = NDesigner.GetDesigner(m_ListBox.Selection).CreatePropertyEditor(m_ListBox.Selection,
                                                                                                     NListBoxSelection.ModeProperty);
            NLabel label = (NLabel)editor.GetDescendants(new NInstanceOfSchemaFilter(NLabel.NLabelSchema))[0];

            label.Text = "Selection Mode:";
            propertiesStack.Add(editor);

            NGroupBox propertiesGroupBox = new NGroupBox("Properties", new NUniSizeBoxGroup(propertiesStack));

            stack.Add(propertiesGroupBox);

            // Create the events log
            m_EventsLog = new NExampleEventsLog();
            stack.Add(m_EventsLog);

            return(stack);
        }