Exemple #1
0
        private Grid RenderSection([NotNull] ItemUri sectionItemUri, [NotNull] string sectionName, bool expandedByDefault)
        {
            Assert.ArgumentNotNull(sectionName, nameof(sectionName));

            var result = new Default.Section
            {
                ItemUri = sectionItemUri,
                ExpandedByDefault = expandedByDefault,
                Text = sectionName,
                ContentEditor = ContentEditor,
            };

            Editor.Children.Add(result);

            var grid = new Grid
            {
                // Margin = new Thickness(0, 8, 0, 0)
            };

            result.Children.Add(grid);

            grid.ColumnDefinitions.Add(new ColumnDefinition
            {
                Width = GridLength.Auto,
                MinWidth = 150
            });

            grid.ColumnDefinitions.Add(new ColumnDefinition
            {
                Width = new GridLength(1, GridUnitType.Star)
            });

            return grid;
        }
Exemple #2
0
        private Default.Section RenderSection([NotNull] ItemUri sectionItemUri, [NotNull] string sectionName, bool expandedByDefault)
        {
            Assert.ArgumentNotNull(sectionName, nameof(sectionName));

            var result = new Default.Section
            {
                ItemUri           = sectionItemUri,
                ExpandedByDefault = expandedByDefault,
                Text          = sectionName,
                ContentEditor = ContentEditor
            };

            Editor.Children.Add(result);

            return(result);
        }