Click here to Skip to main content
15,892,927 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: How to open second page on click event Pin
Mycroft Holmes17-Jul-12 12:39
professionalMycroft Holmes17-Jul-12 12:39 
AnswerRe: How to open second page on click event Pin
Abhinav S17-Jul-12 16:01
Abhinav S17-Jul-12 16:01 
QuestionFruit Ninja sword effect Pin
wasimsharp15-Jul-12 6:27
wasimsharp15-Jul-12 6:27 
AnswerRe: Fruit Ninja sword effect Pin
Maximilien15-Jul-12 6:41
Maximilien15-Jul-12 6:41 
GeneralRe: Fruit Ninja sword effect Pin
wasimsharp15-Jul-12 6:44
wasimsharp15-Jul-12 6:44 
GeneralRe: Fruit Ninja sword effect Pin
Paul Conrad19-Jul-12 18:22
professionalPaul Conrad19-Jul-12 18:22 
QuestionWPF TreeView Style Pin
Kevin Marois13-Jul-12 10:07
professionalKevin Marois13-Jul-12 10:07 
AnswerRe: WPF TreeView Style Pin
Cracked-Down17-Jul-12 21:52
Cracked-Down17-Jul-12 21:52 
you can do this using the following steps.
<Window.Resources>
.
.
.
<Style TargetType="{x:Type TreeViewItem}">
        <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
    </Style>
.
.
.

<Window.Resources>


and in the treeview

C#
<controls:TreeViewEx ItemsSource="{Binding TreeData}"
                             SelectedItemEx="{Binding SelectedTreeItem, Mode=TwoWay}"
                             Grid.Row="0"
                             Grid.Column="0"
                             ItemTemplate="{StaticResource treeDataTemplate}"
                              Style="{DynamicResource TreeViewStyle}">


and in the datatemplate add a key

C#
<HierarchicalDataTemplate x:Key="treeDataTemplate" DataType="{x:Type models:NodeModel}"
                              ItemsSource="{Binding Path=Children}">


I would like note one thing about managing resources. All the related resources should be added in the resource dictionary. In your case I would like to suggest that, have separate resource dictionary e.g. "NavigationTreeResources.xaml" for TreeView and add your DataTemplates and style in it. Adding the resources in Windows makes the windows.xaml huge as well as restrict the scope of the resources to current Smile | :) window.


Hope this information helps to solve your problem
Happy Coding
Big Grin | :-D Big Grin | :-D

QuestionCall Web Service From Silverlight Application Pin
youness12-Jul-12 22:55
youness12-Jul-12 22:55 
AnswerRe: Call Web Service From Silverlight Application Pin
Pete O'Hanlon12-Jul-12 23:07
mvePete O'Hanlon12-Jul-12 23:07 
GeneralRe: Call Web Service From Silverlight Application Pin
youness13-Jul-12 5:23
youness13-Jul-12 5:23 
GeneralRe: Call Web Service From Silverlight Application PinPopular
Pete O'Hanlon15-Jul-12 11:13
mvePete O'Hanlon15-Jul-12 11:13 
GeneralRe: Call Web Service From Silverlight Application Pin
Mycroft Holmes16-Jul-12 0:34
professionalMycroft Holmes16-Jul-12 0:34 
GeneralRe: Call Web Service From Silverlight Application Pin
Pete O'Hanlon16-Jul-12 1:15
mvePete O'Hanlon16-Jul-12 1:15 
AnswerRe: Call Web Service From Silverlight Application Pin
Anumeha Shukla15-Jul-12 23:36
Anumeha Shukla15-Jul-12 23:36 
AnswerRe: Call Web Service From Silverlight Application Pin
vinodkrebc17-Jul-12 19:46
vinodkrebc17-Jul-12 19:46 
QuestionWPF Hyperlink In Treeview Problem Pin
Kevin Marois12-Jul-12 10:26
professionalKevin Marois12-Jul-12 10:26 
AnswerRe: WPF Hyperlink In Treeview Problem Pin
Ian Shlasko12-Jul-12 10:55
Ian Shlasko12-Jul-12 10:55 
GeneralRe: WPF Hyperlink In Treeview Problem Pin
Kevin Marois12-Jul-12 11:10
professionalKevin Marois12-Jul-12 11:10 
GeneralRe: WPF Hyperlink In Treeview Problem Pin
Ian Shlasko12-Jul-12 11:22
Ian Shlasko12-Jul-12 11:22 
GeneralRe: WPF Hyperlink In Treeview Problem Pin
SledgeHammer0112-Jul-12 11:23
SledgeHammer0112-Jul-12 11:23 
GeneralRe: WPF Hyperlink In Treeview Problem Pin
Kevin Marois12-Jul-12 11:34
professionalKevin Marois12-Jul-12 11:34 
GeneralRe: WPF Hyperlink In Treeview Problem Pin
SledgeHammer0112-Jul-12 12:13
SledgeHammer0112-Jul-12 12:13 
GeneralRe: WPF Hyperlink In Treeview Problem Pin
Kevin Marois12-Jul-12 12:23
professionalKevin Marois12-Jul-12 12:23 
GeneralRe: WPF Hyperlink In Treeview Problem Pin
SledgeHammer0112-Jul-12 12:54
SledgeHammer0112-Jul-12 12:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.