public void AppendStructureFilterControl(object control, bool isExpanded) { var c = control as Control; if (c == null) { return; } var filterControl = new GroupContainer { CanCollapse = true, Text = Helpers.Localizer.GetString("strMetadataStructureFilter", LocalizableConstantsInternal.strMetadataStructureFilter), Dock = DockStyle.Top, IsExpanded = isExpanded }; filterControl.AddSecondaryControl(c); propertiesBar.Controls.Add(filterControl); propertiesBar.Controls.SetChildIndex(filterControl, 0); }
public void AppendStructureFilterControl(object control, bool isExpanded) { var c = control as FrameworkElement; if (c == null) { return; } var filterControl = new GroupContainer { CanCollapse = true, Text = Helpers.Localizer.GetString("strMetadataStructureFilter", Helpers.ConvertLanguageFromNative(Language), LocalizableConstantsInternal.strMetadataStructureFilter), VerticalAlignment = VerticalAlignment.Top, IsExpanded = isExpanded }; var row = 0; ((Grid)PropertiesBar).RowDefinitions.Clear(); foreach (FrameworkElement child in ((Grid)PropertiesBar).Children) { child.SetValue(Grid.RowProperty, row); ((Grid)PropertiesBar).RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto }); row++; } ((Grid)PropertiesBar).RowDefinitions.Add(new RowDefinition()); filterControl.AddSecondaryControl(c); filterControl.SetValue(Grid.RowProperty, row); ((Grid)PropertiesBar).Children.Add(filterControl); }