VincentH-Net / CSharpForMarkup

Concise, declarative C# UI markup for .NET browser / native UI frameworks
MIT License
748 stars 43 forks source link

Need a recipe for adding/extending local Helpers to a project #29

Open scottcg opened 2 years ago

scottcg commented 2 years ago

For some reason, adding this to a client project breaks the current Helper class (haven't investigated deeply enough what other options are):

namespace CSharpMarkup.Wpf;

public static class Helpers
{
    public static TextBlock TextBlock(System.Windows.Documents.Inline[] chidren)
    {
        var ui = new System.Windows.Controls.TextBlock();
        foreach (var ch in chidren) ui.Inlines.Add(ch);

        return ui;
    }
}