Alex141 / CalcBinding

Advanced WPF Binding which supports expressions in Path property and other features
Apache License 2.0
638 stars 79 forks source link

fix bug like {c:Binding .} and `add support for shortcut of RelativeSource` #73

Open endlesstravel opened 3 years ago

endlesstravel commented 3 years ago

see issue https://github.com/Alex141/CalcBinding/issues/72

it will lead {c:Binding .} work like {Binding .}

endlesstravel commented 3 years ago

add support for shortcut of RelativeSource at https://github.com/Alex141/CalcBinding/pull/73/commits/85ca73b5d749bd848280574a0a38bebcb7892080

zzzzz@PreviousData           // means {Binding Path=zzzzz, RelativeSource={RelativeSource PreviousData}}
yyyyy@TemplatedParent        // means {Binding Path=yyyyy, RelativeSource={RelativeSource TemplatedParent}}
Parent.Name@Self             // means {Binding Path=Parent.Name, RelativeSource={RelativeSource Self}}
xxxx@FindAncestor.Grid       // means {Binding Path=xxxx, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Grid}}}
xxxx@FindAncestor[2].Grid    // means {Binding Path=xxxx, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Grid}, AncestorLevel=2}}
xxxx@Grid                    // means {Binding Path=xxxx, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Grid}}}
Title@Window                 // means {Binding Path=Title, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}