Hi, i've got a problem.
in my project i've a class like this :
Any Idea.. THANX IN ADVANCE
in my project i've a class like this :
public
class
Progetto
{
public
Progetto()
{
ID = 0;
Descrizione = String.Empty;
Stringhe =
new
ObservableCollection<Stringa>();
Sprites =
new
ObservableCollection<Sprite>();
}
public
int
ID {
set
;
get
; }
public
String Descrizione {
set
;
get
; }
public
ObservableCollection<Stringa> Stringhe {
set
;
get
; }
public
ObservableCollection<Sprite> Sprites {
set
;
get
; }
}
In my RadTree i'd like to see under the root node (Progetto) the two items "stringhe" and "sprites". I Tried with HierarchicalDataTemplate but with no result because under the root node i can only see "Stringhe" or "Sprites"... how to see that together ?? :
here my Hierrarchical..
<
HierarchicalDataTemplate
x:Key
=
"Stringa"
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
TextBlock
Text
=
"{Binding Ciao}"
Foreground
=
"Black"
FontWeight
=
"Bold"
FontSize
=
"12"
/>
<
TextBlock
Text
=
"{Binding Descrizione}"
Foreground
=
"Black"
FontWeight
=
"Bold"
FontSize
=
"12"
/>
</
StackPanel
>
</
HierarchicalDataTemplate
>
<
HierarchicalDataTemplate
x:Key
=
"Sprite"
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
TextBlock
Text
=
"{Binding ID}"
Foreground
=
"Black"
FontWeight
=
"Bold"
FontSize
=
"12"
/>
<
TextBlock
Text
=
"{Binding Descrizione}"
Foreground
=
"Black"
FontWeight
=
"Bold"
FontSize
=
"12"
/>
</
StackPanel
>
</
HierarchicalDataTemplate
>
<
HierarchicalDataTemplate
x:Key
=
"Progetti"
ItemsSource
=
"{Binding Stringhe}"
ItemTemplate
=
"{StaticResource Stringa}"
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
TextBlock
Text
=
"{Binding ID}"
Foreground
=
"Black"
FontWeight
=
"Bold"
FontSize
=
"12"
/>
<
TextBlock
Text
=
"{Binding Descrizione}"
Foreground
=
"Black"
FontWeight
=
"Bold"
FontSize
=
"12"
/>
</
StackPanel
>
</
HierarchicalDataTemplate
>
Any Idea.. THANX IN ADVANCE