Guest User

Untitled

a guest
Apr 21st, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. <ItemsControl Name="itemsControl">
  2.  
  3. <ItemsControl.ItemsPanel>
  4. <ItemsPanelTemplate>
  5. <UniformGrid Rows="16" Columns="16" Width="{Binding RelativeSource={RelativeSource Self}, Path=ActualHeight}" HorizontalAlignment="Left" />
  6. </ItemsPanelTemplate>
  7. </ItemsControl.ItemsPanel>
  8.  
  9. <ItemsControl.ItemTemplate>
  10. <DataTemplate>
  11. <Button Background="{Binding ., Converter={StaticResource IntToFillConverter}}" Command="{Binding Command_Selected_Cell}">
  12. <Button.CommandParameter>
  13. <MultiBinding Converter="{StaticResource MyMultiBindingConverter}">
  14. <!-- Position x -->
  15. <Binding Path="?????"/>
  16. <!-- Position y -->
  17. <Binding Path="?????"/>
  18. </MultiBinding>
  19. </Button.CommandParameter>
  20. </Button>
  21. </DataTemplate>
  22. </ItemsControl.ItemTemplate>
  23.  
  24. </ItemsControl>
  25.  
  26. public PlateauCombatPage()
  27. {
  28. InitializeComponent();
  29. MyCollection = new ObservableCollection<int>();
  30.  
  31. MyCollection.Add(0);
  32. [...]
  33. MyCollection.Add(1);
  34.  
  35. itemsControl.ItemsSource = MyCollection;
  36. }
Add Comment
Please, Sign In to add comment