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

Binding from a Setter in Codebehind to a brushdefinied in resources

$
0
0

Hey,

i temporaly inside a Style for a control in codebehind. There, i applied a Trigger. This Trigger should bind to a brush, which is definied inside a ResourceDicionary. So, the StaticResource Keyword is the right one. But how is the correct Notation?

i tried:

trigger.Setters.Add(

newSetter(DataGridRow.BorderBrushProperty,newBinding() { Path = newPropertyPath("StaticResource TabItemRowSelectedBorderBrush") }));

but this doesn't work.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



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