views:

43

answers:

1

is it possible to define resources in the style rather then using a template?

    <ListView.Resources >
        <Style TargetType="{x:Type ScrollBar}">
              <Setter Property="Background" Value="Transparent" />
         </Style>
    </ListView.Resources>

How can I wrap this thing into:

   <Style TargetType="{x:Type ListView}"> 

   </Style>

?

+1  A: 

I'm not sure I understand your question correctly... is that what you're looking for ?

    <Style TargetType="{x:Type ScrollBar}">
          <Style.Resources>
              <Style TargetType="{x:Type ListView}"> 

              </Style>

          </Style.Resources>
          <Setter Property="Background" Value="Transparent" />
     </Style>
Thomas Levesque