public static IEnumerable <IContainerTypeInfo <Container> > GetContainerTypes() { foreach (var type in GetPanelTypes()) { yield return(type); } yield return(ContainerTypeInfo.New <TableLayout>((container, child) => container.Rows.Add(child))); yield return(ContainerTypeInfo.New <StackLayout>((container, child) => container.Items.Add(child))); yield return(ContainerTypeInfo.New <DynamicLayout>((container, child) => container.Add(child))); }
public static IEnumerable <IContainerTypeInfo <Panel> > GetPanelTypes() { yield return(ContainerTypeInfo.New <Panel>((container, child) => container.Content = child)); yield return(ContainerTypeInfo.New( () => new Expander { Header = "Expander", Expanded = true }, (container, child) => container.Content = child )); yield return(ContainerTypeInfo.New( () => new GroupBox { Text = "GroupBox" }, (container, child) => container.Content = child )); yield return(ContainerTypeInfo.New( () => new TabPage { Text = "TabPage" }, (container, child) => container.Content = child, container => new TabControl { Pages = { container } } )); yield return(ContainerTypeInfo.New( () => new DocumentPage { Text = "DocumentPage" }, (container, child) => container.Content = child, container => new DocumentControl { Pages = { container } } )); yield return(ContainerTypeInfo.New <Scrollable>((container, child) => container.Content = child)); yield return(ContainerTypeInfo.New <Drawable>((container, child) => container.Content = child)); }