I have a UserControl, where my DataContext is defined as an attribute within my tag. Anywhere outside of my UserControl's Resources, I can bind to properties within my DataContext. However, when I attempt to do this within my control's Resources, I encounter the following: System.InvalidOperationException: Must have non-null value for 'Binding'.
I suspect this is because the DataContext is not being applied within the scope (the Resource tag) I'm trying to use it in, not only because the Binding is null, but because the property I'm trying to bind to never gets called before the crash as well. My question is: how can I bind to a property within my DataContext within this specific scope? I've tried a few things at this point, such as giving the UserControl an x:Name and attempting to set a Source={x:Reference the_x:Name}, but to no avail.
Below, B and C are the properties within my DataContext with the aforementioned issue. A is fine, as that is just a property of my Style's TargetType.
<UserControl... (DataContext defined here)>
<UserControl.Resources...>
<Style...>
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Property="A" Value="D"/>
<Condition>
<Condition.Binding>
<MultiBinding Converter="{StaticResource SomeIMultiValueConverter}">
<Binding Path="B"/>
<Binding Path="C"/>
</MultiBinding>
</Condition.Binding>
<Condition.Value>
<sys:Boolean>False</sys:Boolean>
</Condition.Value>