2012-02-09 6 views
0

を表示されません。私は、リストボックスの項目について、次のデータテンプレートがあります。のDataTemplateが

<DataTemplate x:Key="substanceListShower"> 
    <ListBox ItemsSource="{Binding Items}"> 
     <ItemsPanelTemplate> 
      <StackPanel Orientation="Horizontal"/> 
     </ItemsPanelTemplate> 
    </ListBox> 
</DataTemplate> 

をそして私はこのような項目テンプレートを適用します。

ReactantInterfacesListBox.ItemTemplate = (DataTemplate)FindResource("substanceListShower"); 

しかし、私は、ToStringメソッド()のリターンを得るための項目リストの中:

System.Windows.Controls.ItemsPanelTemplate

助けていただければ幸いです。

答えて

1

ItemsPanelTemplateListBoxに追加すると、定義にはListBox.ItemsPanelというタグがなく、代わりにプロパティを設定できます。

関連する問題