I want to use a VisualBrush in App.xaml:
<Application.Resources>
<VisualBrush x:Key="TestBrush1" />
<VisualBrush x:Key="TestBrush2" />
</Application.Resources>
Then I want to set a binding in one window like this:
VisualBrush testBrush = (VisualBrush)FindResource("TestBrush1");
Binding testBinding = new Binding();
testBinding.Source = FirstBrowser;
testBrush.Visual = testBinding;
And then I want to use this Brush to show the content of the FirstBrowser to another window. But that would come later. The binding does not work this way. Has someone an idea how I can make this work?