Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <ItemsControl Name="itemsControl">
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <UniformGrid Rows="16" Columns="16" Width="{Binding RelativeSource={RelativeSource Self}, Path=ActualHeight}" HorizontalAlignment="Left" />
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Button Background="{Binding ., Converter={StaticResource IntToFillConverter}}" Command="{Binding Command_Selected_Cell}">
- <Button.CommandParameter>
- <MultiBinding Converter="{StaticResource MyMultiBindingConverter}">
- <!-- Position x -->
- <Binding Path="?????"/>
- <!-- Position y -->
- <Binding Path="?????"/>
- </MultiBinding>
- </Button.CommandParameter>
- </Button>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- public PlateauCombatPage()
- {
- InitializeComponent();
- MyCollection = new ObservableCollection<int>();
- MyCollection.Add(0);
- [...]
- MyCollection.Add(1);
- itemsControl.ItemsSource = MyCollection;
- }
Add Comment
Please, Sign In to add comment