Bind Collection to StackPanel

Alright I have figured it out… Using an ItemsControl solved the problem…

<ItemsControl x:Name="tStack" Grid.Column="0">
   <ItemsControl.ItemsPanel>
      <ItemsPanelTemplate>
         <StackPanel Orientation="Horizontal"/>
      </ItemsPanelTemplate>
   </ItemsControl.ItemsPanel>
   <ItemsControl.ItemTemplate>
      <DataTemplate>
         <Button Content="{Binding ItemName}"/>
      </DataTemplate>
   </ItemsControl.ItemTemplate>
</ItemsControl>

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)