public static IFluentStyle PanelTemplate(this IFluentStyle fluentStyle, IFluentTemplateItem template) { var fluentTemplateItem = template as FluentTemplateItem; FrameworkElementFactory factory = fluentTemplateItem.GetFactory(); factory.SetValue(Panel.IsItemsHostProperty, true); fluentStyle.Set(ItemsControl.ItemsPanelProperty, new ItemsPanelTemplate { VisualTree = factory }); return(fluentStyle); }
public static IFluentStyle Template(this IFluentStyle fluentStyle, ControlTemplate template) { fluentStyle.Set(Control.TemplateProperty, template); return(fluentStyle); }