Open Mikolaytis opened 2 days ago
Consider {Binding And(SideBar.Illustrations.IsSelected, !#EyedropperPanel.IsVisible)}
as an alternative syntax proposal. It also has a precedent in XAML: https://learn.microsoft.com/en-us/windows/uwp/data-binding/function-bindings
Consider
{Binding And(SideBar.Illustrations.IsSelected, !#EyedropperPanel.IsVisible)}
as an alternative syntax proposal. It also has a precedent in XAML: https://learn.microsoft.com/en-us/windows/uwp/data-binding/function-bindings
my proposal is easier to implement because parsing is not an issue, and already supported by analysis of a rider. also my proposal can combine different types of Bindings... TemplateBinding, maybe x:Static, and Static/DynamicResource...
Is your feature request related to a problem? Please describe.
To have a nice xaml we use {And} and {Or} markup extensions, that support bindings, etc. Here is an example:
Also it supports nesting:
Describe the solution you'd like
I think this should be supported by the compiler, because markup extensions have allocation overhead.
Describe alternatives you've considered
Here is how our
And
andOr
markup extensions look:And looks the same as Or
Additional context
We have 275 multibindings in our codebase. All of them using markup extension style over
<multibinding>
style for making a markup code smaller, 10x easier to read - and this is a real benefit in a complex markups.