WPF-Forge/Forge.Forms

Demo suggestion

hashitha opened this issue ยท 6 comments

Just a suggestion if you ever re-write the demo you might want to have a look at MaterialDesignToolKit demo. Their new demo makes it very easy to copy the code necessary for a new user.

image

Something similar can be done, though for this library we would have to display the class or xml that creates that form instead of XAML.

Crazy idea: walk the built form definition and generate code from the fields/resources. This would allow generating code from the form.

@edongashi you mean using this?

Writing xaml would not be possible unless we embed a small runtime for features like validation/bindings.

What I was thinking was something like this:

You have a form with 2 rows, first row contains a StringField with a Name that is an IValueProvider of PropertyBinding(Name="MyName")

The other row may contain an ActionElement with a label IValueProvider of LiteralValue("LOGIN")

From these facts I can derive that we have a form with a string and an action, more exactly:

[Action("something", "LOGIN")]
class Form
{
  [Field(Name = "{Binding MyName}")]
  public string Something  { get; set; }
}

I have another idea which is much easier, anyone knows how to display highlighted c# source code?

I think https://github.com/icsharpcode/AvalonEdit may have some re-usable components. How does MD in xaml demo handle this?

Plain old xcopy did the trick ๐Ÿ”ฅ

image

image