Building up on this question using the method presented here. To sum it up, it's about using a rectangle to copy the part of a background image it's covering and blurring it's content, so it can be used as transparent blurred background for other controls.
I would like to use the solution as a user control, so it's easier to implement and maintain it across all my windows, but I'm struggling to understand element references or bindings in XAML. I do understand binding data from code to the UI, but not UI elements all within XAML.
Take this stripped down example from the aforementioned solution:
[...]
<Image x:Name="image" Source="stuff.png"/>
<Rectangle.Fill>
<VisualBrush>
[...]
Visual="{Binding ElementName=image}"
<VisualBrush.Viewbox>
<MultiBinding Converter="{StaticResource visualBrushConverter}">
<Binding ElementName="grid"/>
</MultiBinding>
</VisualBrush.Viewbox>
</VisualBrush>
</Rectangle.Fill>
[...]
The VisualBrush's visual is bound to the image defined at the top. The same goes for the binding "grid" in the converter. Now the code under the first image declaration is supposed to be a user control, in which both "image" and "grid" are not available, but are supposed to be passed on to the user control. How would I go about that? Is this even possible within XAML only?
I have read through solutions like this but I'm not sure it would apply to my case and I don't quite understand what's going on there either.