0
環境:Silverlight的4.0顯示數據 - 數據未顯示
我將數據綁定到Silverlight的Accodion控制,但如下不顯示數據我的代碼:
<layout:Accordion HorizontalAlignment="Left" Name="accordion1" Width="761" Height="205" Background="SkyBlue" VerticalAlignment="Top" Margin="32,404,0,0">
<layout:Accordion.ItemTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding ITRUserName}" />
</StackPanel>
</DataTemplate>
</layout:Accordion.ItemTemplate>
<layout:Accordion.ContentTemplate>
<DataTemplate>
<TextBlock Text="{Binding ITRUserName}" />
</DataTemplate>
</layout:Accordion.ContentTemplate>
</layout:Accordion>
xaml.cs:
accordion1.ItemsSource = ITRDescriptionlist
Public Property _itrdescription As New List(Of ITRDescription)
Public Property ITRDescriptionList() As List(Of ITRDescription)
Get
Return _itrdescription
End Get
Set(ByVal value As List(Of ITRDescription))
_itrdescription = value
End Set
End Property
Public Class ITRDescription
Private Property _ITRDescription As String
Public Property ITRDescription() As String
Get
Return _ITRDescription
End Get
Set(ByVal value As String)
_ITRDescription = value
End Set
End Property
Private Property _ITRDate As String
Public Property ITRDate() As String
Get
Return _ITRDate
End Get
Set(ByVal value As String)
_ITRDate = value
End Set
End Property
Private Property _ITRUsername As String
Public Property ITRUserName() As String
Get
Return _ITRUsername
End Get
Set(ByVal value As String)
_ITRUsername = value
End Set
End Property
End Class
我想,如下圖中顯示的數據: