VincentH-Net / CSharpForMarkup

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

How to set properties like `ScrollViewer.HorizontalScrollMode`? #23

Closed VincentH-Net closed 2 years ago

VincentH-Net commented 2 years ago

Should I call Invoke for setting simple properties like ScrollViewer.HorizontalScrollMode?

Originally posted by @YegorStepanov in https://github.com/VincentH-Net/CSharpForMarkup/issues/19#issuecomment-1000878827

VincentH-Net commented 2 years ago

@YegorStepanov it should be set like below, however it looks like a defect in the codegen prevents the ScrollViewer_HorizontalScrollMode() method from being generated. This issue affects all attached properties that are also a regular property on the defining type. I am fixing this now.

Explicit scrollviewer (works now):

ScrollViewer (
    // ...
)  .HorizontalScrollMode().Enabled()

Implicit scrollviewer (needs fix):

ListView (
    // ...
)  .ScrollViewer_HorizontalScrollMode().Enabled()
VincentH-Net commented 2 years ago

@YegorStepanov fixed in 0.6.1-dev.4