예제 #1
0
        public static GapPlugin AddGap(this IConfigContext context, GapPluginConfig config)
        {
            config ??= new GapPluginConfig();
            var plugin = new GapPlugin(config);

            context.AddLayoutProxy((layout) =>
            {
                var gapLayout = new GapLayoutEngine(layout, config.InnerGap, config.OuterGap, config.Delta);
                plugin.RegisterLayout(gapLayout);
                return(gapLayout);
            });
            context.Plugins.RegisterPlugin(plugin);

            return(plugin);
        }
예제 #2
0
 public void RegisterLayout(GapLayoutEngine layout)
 {
     _layoutEngines.Add(layout);
 }