How do I programmatically create buttons with images on them. I want to store the buttons with images in memory representing all possible cards in a card game. Then, when I display the dealt cards to the player I can select the right card from my array of all possible cards.
Button[] cardButtons = new Button[52];
for(int i = 0; i < 52; i++)
{
cardButtons[i] = new Button();
cardButtons[i] = new Image(.... I dont know what goes here, or if any of this is correct!)
}
Am I on the right track?
Thanks in advance
You can use the .Content property of the Button class.