Click here to Skip to main content
15,897,371 members
Home / Discussions / WPF
   

WPF

 
QuestionHow to make muti-geometryModel3D to make different colors in trangle Pin
derek09198-Dec-11 2:51
derek09198-Dec-11 2:51 
Questionhow to draw multi-lines in WPF Pin
Hamed Metalgear6-Dec-11 22:10
Hamed Metalgear6-Dec-11 22:10 
AnswerRe: how to draw multi-lines in WPF Pin
Wayne Gaylard6-Dec-11 22:34
professionalWayne Gaylard6-Dec-11 22:34 
GeneralRe: how to draw multi-lines in WPF Pin
Hamed Metalgear6-Dec-11 22:40
Hamed Metalgear6-Dec-11 22:40 
GeneralRe: how to draw multi-lines in WPF Pin
Wayne Gaylard6-Dec-11 22:44
professionalWayne Gaylard6-Dec-11 22:44 
GeneralRe: how to draw multi-lines in WPF Pin
Hamed Metalgear6-Dec-11 22:46
Hamed Metalgear6-Dec-11 22:46 
GeneralRe: how to draw multi-lines in WPF Pin
Pete O'Hanlon6-Dec-11 23:17
mvePete O'Hanlon6-Dec-11 23:17 
QuestionTreeView Data Template & Binding Question Pin
Kevin Marois6-Dec-11 12:44
professionalKevin Marois6-Dec-11 12:44 
I have a collection of FolderModel and FileModel object. The FolderModel has 2 list properties holding FolderModels and FileModels. A folder can contain a list of Folders and/or a list of Files. It's populated like this:

RootFolder
   |_Folder_A
       |_ File_1
       |_ File_2
       |_ Folder_A1
           |_ File_5
           |_ File_6
           |_ Folder_A2
   |_Folder_B
       |_ File_3
       |_ File_4
       |_ Folder_B1


I'm trying display te data in a treeview. My templates are:

<HierarchicalDataTemplate DataType="{x:Type models:FolderModel}"
                            ItemsSource="{Binding Path=Folders}">
    <StackPanel Orientation="Horizontal" 
                Margin="2">
        <TextBlock Text="{Binding Path=Caption}"/>
    </StackPanel>
</HierarchicalDataTemplate>

<DataTemplate DataType="{x:Type models:FileModel}">
    <StackPanel Orientation="Horizontal"
                Margin="2">
        <TextBlock Margin="0,0,5,0">
            <Hyperlink NavigateUri="{Binding Caption}"
                        Foreground="#0C2DAA"
                        Command="{Binding SelectedLinkCommand}">
                <InlineUIContainer>
                    <TextBlock Text="{Binding Caption}" />
                </InlineUIContainer>

                <Hyperlink.Style>     
                    <Style TargetType="Hyperlink">       
                        <Style.Triggers>         
                            <Trigger Property="IsMouseOver" Value="False">
                                <Setter Property="TextDecorations" Value="{x:Null}" />         
                            </Trigger>       
                        </Style.Triggers>     
                    </Style>   
                </Hyperlink.Style> 

            </Hyperlink>
                    
        </TextBlock>

    </StackPanel>

</DataTemplate>


When I run it, all I see are the folders. The files are not showing up. What am I doing wrong?
Everything makes sense in someone's mind

AnswerRe: TreeView Data Template & Binding Question Pin
Mycroft Holmes6-Dec-11 13:52
professionalMycroft Holmes6-Dec-11 13:52 
GeneralRe: TreeView Data Template & Binding Question Pin
SledgeHammer016-Dec-11 13:55
SledgeHammer016-Dec-11 13:55 
GeneralRe: TreeView Data Template & Binding Question Pin
Mycroft Holmes6-Dec-11 14:00
professionalMycroft Holmes6-Dec-11 14:00 
GeneralRe: TreeView Data Template & Binding Question Pin
SledgeHammer016-Dec-11 14:17
SledgeHammer016-Dec-11 14:17 
GeneralRe: TreeView Data Template & Binding Question Pin
Mycroft Holmes6-Dec-11 14:21
professionalMycroft Holmes6-Dec-11 14:21 
GeneralRe: TreeView Data Template & Binding Question Pin
SledgeHammer016-Dec-11 14:25
SledgeHammer016-Dec-11 14:25 
GeneralRe: TreeView Data Template & Binding Question Pin
Mycroft Holmes6-Dec-11 16:22
professionalMycroft Holmes6-Dec-11 16:22 
GeneralRe: TreeView Data Template & Binding Question Pin
Kevin Marois6-Dec-11 14:08
professionalKevin Marois6-Dec-11 14:08 
GeneralRe: TreeView Data Template & Binding Question Pin
Mycroft Holmes6-Dec-11 14:18
professionalMycroft Holmes6-Dec-11 14:18 
GeneralRe: TreeView Data Template & Binding Question Pin
SledgeHammer016-Dec-11 14:21
SledgeHammer016-Dec-11 14:21 
AnswerRe: TreeView Data Template & Binding Question Pin
SledgeHammer016-Dec-11 13:53
SledgeHammer016-Dec-11 13:53 
GeneralRe: TreeView Data Template & Binding Question Pin
Kevin Marois8-Dec-11 7:12
professionalKevin Marois8-Dec-11 7:12 
AnswerRe: Popup vs Tooltip Pin
Pete O'Hanlon6-Dec-11 4:48
mvePete O'Hanlon6-Dec-11 4:48 
GeneralRe: Popup vs Tooltip Pin
SledgeHammer016-Dec-11 10:42
SledgeHammer016-Dec-11 10:42 
GeneralRe: Popup vs Tooltip Pin
SledgeHammer016-Dec-11 11:35
SledgeHammer016-Dec-11 11:35 
QuestionBest way to save/load data locally. WPF Pin
Paul Harsent5-Dec-11 3:51
Paul Harsent5-Dec-11 3:51 
AnswerRe: Best way to save/load data locally. WPF Pin
Pete O'Hanlon5-Dec-11 4:40
mvePete O'Hanlon5-Dec-11 4:40 

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.