Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Using a binding for a static resource

$
0
0

I want to bind the border background to a property - which will relate to a static resource. I currently get a XAML exception saying it cant' find resource Windows.Binding. 

So if I set the property BorderBackground to "Instrucitons" it will set the corresponding colour. 

Background="{StaticResource {Binding BorderBackground}}

<SolidColorBrush x:Key="Instructions" Color="#D80073" />






Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>