AvaloniaUI / avalonia-docs

https://docs.avaloniaui.net/docs/welcome
65 stars 213 forks source link

Create setter-precedence.md #372

Closed stevemonaco closed 8 months ago

stevemonaco commented 9 months ago

This new document attempts to explain how Setter precedence is settled. It gives minimal examples for each BindingPriority, explains the overall precedence when BindingPriority is equal, points out some pitfalls and potential misconceptions, and goes through the most common blocking scenario in the "BindingPriority Does Not Propagate" section.

More emphasis on quality should be given to this doc than others as these concepts are exclusive to Avalonia. There are no secondary docs to supplement.

I'm happy overall with the result, but the example in "BindingPriority Does Not Propagate" is rough in terms of having a dense explanation. Could use some review in that area as there are many moving pieces. Possibly could summarize each Setter with priority / locality in a table? Lack of annotations (AFAIK) within Code Blocks hurts. I couldn't think of a simpler example besides "Button:pointerover" and adding another full example.

Some information is already present in property-setters.md and troubleshooting.md. I'll rework those later, if accepted.

Edit: Added the mentioned table for "BindingPriority Does Not Propagate". Hopefully a bit clearer.

Closes #347