Good evening!

Faced such a problem: there is a ResourceDictionary. It contains two styles: the first for the ComboBox, the second for the TextBlock. In the first case, the binding works without problems:

<Style x:Key="{x:Type CheckBox}" TargetType="{x:Type CheckBox}"> 

And in the second:

 <Style x:Key="{x:Type TextBlock}" TargetType="{x:Type TextBlock}"> 

binding does not occur (

I brought out this style to another file, still the problem is not solved. TextBlock is a lot, and manually setting everything is not very beautiful.

  • Give a reproducing example, everything works for me. - VladD
  • one
    And yes, to prescribe a global style for TextBlock 'and not good, it is used everywhere and by everyone. It is better to connect the style locally, to a Grid 's ResourceDictionary or another container. - VladD
  • everything worked out too - Arthur
  • @VladD I connect the file with these styles only for the XAML file in which I store the template for the collection. For the rest, it is not available. - UporotayaPanda
  • one
    @UporotayaPanda: Now you know that the problem is not where you thought it was. Search where, and change the description of the question. - VladD

0