Exemple #1
0
        private Control Layout(Panel Container, Networking.XMPP.DataForms.Layout.Section Section, DataForm Form)
        {
            GroupBox GroupBox = new GroupBox();

            Container.Children.Add(GroupBox);
            GroupBox.Header = Section.Label;
            GroupBox.Margin = new Thickness(5, 5, 5, 5);

            StackPanel StackPanel = new StackPanel();

            GroupBox.Content  = StackPanel;
            StackPanel.Margin = new Thickness(5, 5, 5, 5);

            Control First = null;
            Control Control;

            foreach (LayoutElement Element in Section.Elements)
            {
                Control = this.Layout(StackPanel, Element, Form);
                if (First is null)
                {
                    First = Control;
                }
            }

            return(First);
        }
        private void Layout(Panel Container, Networking.XMPP.DataForms.Layout.Section Section, DataForm Form)
        {
            GroupBox GroupBox = new GroupBox();

            Container.Children.Add(GroupBox);
            GroupBox.Header = Section.Label;
            GroupBox.Margin = new Thickness(5, 5, 5, 5);

            StackPanel StackPanel = new StackPanel();

            GroupBox.Content  = StackPanel;
            StackPanel.Margin = new Thickness(5, 5, 5, 5);

            foreach (LayoutElement Element in Section.Elements)
            {
                this.Layout(StackPanel, Element, Form);
            }
        }