Click here to Skip to main content
15,918,471 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Flippable 3D List Items in WPF Pin
Thomas Stockwell31-Jul-08 8:17
professionalThomas Stockwell31-Jul-08 8:17 
GeneralRe: Flippable 3D List Items in WPF Pin
sumeetneo31-Jul-08 7:56
sumeetneo31-Jul-08 7:56 
GeneralRe: Flippable 3D List Items in WPF Pin
sumeetneo2-Aug-08 1:46
sumeetneo2-Aug-08 1:46 
QuestionIs there similar properity like Anchor Properity in WPF? Pin
bkbharani28-Jul-08 16:55
bkbharani28-Jul-08 16:55 
AnswerRe: Is there similar properity like Anchor Properity in WPF? Pin
MIHAI_MTZ28-Jul-08 21:10
MIHAI_MTZ28-Jul-08 21:10 
GeneralRe: Is there similar properity like Anchor Properity in WPF? Pin
bkbharani28-Jul-08 21:13
bkbharani28-Jul-08 21:13 
AnswerRe: Is there similar properity like Anchor Properity in WPF? Pin
Jammer29-Jul-08 1:36
Jammer29-Jul-08 1:36 
QuestionWPF Hierarchical Data Templates are killing me Pin
gantww26-Jul-08 17:32
gantww26-Jul-08 17:32 
Ok,
I've defined a simple class called NonDataNode that has two members, Name (string) and ContainedItems (object) which will hold whatever type of object is contained by that node in the tree (couldn't be more specific because it could be just about anything). I also created another class called NonDataNodeList, which inherits from List<NonDataNode>. There are no changes in implementation, I just wanted a name that was easier to work with in XAML. ImageOutputType is a business object in my application. lib and local are namespaces defined with xmlns elements at the top of the XAML. The Window.Resources section is before the tree control.

So, the XAML for my treeview looks like this:

<TreeView Grid.Column="0" Grid.Row="2" HorizontalAlignment="Stretch" Background="Transparent" Foreground="{StaticResource TreeViewItemText}"
BorderBrush="DarkRed" BorderThickness="1" x:Name="trvNavigate" ItemTemplate="{StaticResource NonDataNodeTemplate}" >
</TreeView>


In my Window.Resources section, I've defined the following:

<HierarchicalDataTemplate DataType="local:NonDataNode" ItemsSource="{Binding Path=ContainedItems}" x:Key="NonDataNodeTemplate">
<TextBlock Text="{Binding Name}" Style="{StaticResource TreeViewNodeText}"/>
</HierarchicalDataTemplate>
<HierarchicalDataTemplate DataType="lib:ImageOutputType">
<TextBlock Text="{Binding Name}" Style="{StaticResource TreeViewNodeText}"/>
</HierarchicalDataTemplate>


You can see that the key for the heirarchical data template is NonDataNodeTemplate and that the treeview uses that as the item template. However, when I try to run this thing, I get the following error:

Cannot find resource named '{NonDataNodeTemplate}'. Resource names are case sensitive. Error at object 'trvNavigate' in markup file 'WGAdminPanel;component/mainwindow.xaml' Line 76 Position 82.


Now, I'm sure it's something simple I'm missing, but I've been stuck on this for about 4 hours. Can someone help me? I've tried google, but so far I haven't found any examples that I can make work.

Thanks,
Will
AnswerRe: WPF Hierarchical Data Templates are killing me Pin
MIHAI_MTZ28-Jul-08 1:17
MIHAI_MTZ28-Jul-08 1:17 
GeneralRe: WPF Hierarchical Data Templates are killing me Pin
gantww28-Jul-08 13:37
gantww28-Jul-08 13:37 
QuestionWPF hyperlink Click event Pin
Suj_7825-Jul-08 4:45
Suj_7825-Jul-08 4:45 
AnswerRe: WPF hyperlink Click event Pin
Super Lloyd27-Jul-08 21:11
Super Lloyd27-Jul-08 21:11 
QuestionWPF Animation. Pin
ciacia24-Jul-08 20:13
ciacia24-Jul-08 20:13 
AnswerRe: WPF Animation. Pin
Jammer25-Jul-08 0:30
Jammer25-Jul-08 0:30 
QuestionFocus issue Pin
Alex Skye24-Jul-08 7:41
Alex Skye24-Jul-08 7:41 
AnswerRe: Focus issue Pin
The Only Nock8-Aug-08 7:33
The Only Nock8-Aug-08 7:33 
QuestionMaintaing Session between WPF browser application and WCF service Pin
puneet.priyadarshi24-Jul-08 3:50
puneet.priyadarshi24-Jul-08 3:50 
Question[Message Deleted] Pin
C#_Programmer23-Jul-08 21:14
C#_Programmer23-Jul-08 21:14 
AnswerRe: color of wpf listview column Pin
Pete O'Hanlon24-Jul-08 4:33
mvePete O'Hanlon24-Jul-08 4:33 
GeneralRe: color of wpf listview column Pin
C#_Programmer24-Jul-08 8:32
C#_Programmer24-Jul-08 8:32 
GeneralRe: color of wpf listview column Pin
Pete O'Hanlon24-Jul-08 8:53
mvePete O'Hanlon24-Jul-08 8:53 
GeneralRe: color of wpf listview column Pin
Jammer24-Jul-08 22:52
Jammer24-Jul-08 22:52 
GeneralRe: color of wpf listview column Pin
Pete O'Hanlon24-Jul-08 23:59
mvePete O'Hanlon24-Jul-08 23:59 
GeneralRe: color of wpf listview column Pin
Jammer25-Jul-08 0:16
Jammer25-Jul-08 0:16 
QuestionSession state maintanace in wpf browser application Pin
puneet.priyadarshi23-Jul-08 20:35
puneet.priyadarshi23-Jul-08 20:35 

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.