I've created my own custom binding class and added a property to it:
public BindingGroupCollection BindingGroups
{
get { return validationResultGroup; }
set { validationResultGroup = value; }
}
public class BindingGroupCollection : ObservableCollection<BindingGroup> { }
In my xaml class i declared the objects and collection:
<local:BindingGroup x:Key="BG1"/>
<local:BindingGroup x:Key="BG2"/>
<local:BindingGroupCollection x:Key="BindingGroups1">
<StaticResourceExtension ResourceKey="BG1"/>
<StaticResourceExtension ResourceKey="BG2"/>
</local:BindingGroupCollection>
And i want to use this in my binding eg.:
<TextBox Text="{local:CustomBinding BindingGroups={Binding Source={StaticResource BindingGroups1}}}"/>
But i get an error that the target is not a dependeny object. Any help?