locked
Applying a style to an element via UI RRS feed

  • Question

  • I use Blend 4.

    Let's say I want to set  IsExpanded property to "True", to TreeView's TreeViewItem.

    Via UI I need to do this:

    1. select the treeview
    2. From topmenu Object-> Edit additional templates -> Edit generated item container
    3. It generates TreeViewItemStyle1 with a lot of styles and templates that I don't need, just for one property.

    I can do it simply:

    <Window.Resources>
       <Style TargetType="TreeViewItem">
          <Setter Property="IsExpanded" Value="True" />
       </Style>
    </Window.Resources>
    

    My question can I do the same using the UI only?

    Saturday, June 11, 2011 8:53 AM

All replies

  • <controls:TreeView  Height="250" Width="200">

        <controls:TreeViewItem IsExpanded="True" Header="Marks"/>

    </controls:TreeView>

    Tuesday, June 14, 2011 8:48 AM