Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
added 27 characters in body
Source Link

I have a bunch of images I'm using for a chess game in a canvas using wpf, xaml, and C#. I want to use

Canvas.SetTop(image, position);

to set the position of this image. However I am given the index of child in my canvas and that is it.

myCanvas.children[index]

I tried

Canvas.SetTop(myCanvas.children[index], position);

but that did not work. How can I change the position of the image given only the index of the image in the canvas?

Edit: Another option would be to change the position of the canvas child. But I couldn't find anything for that.

I have a bunch of images in a canvas using wpf, xaml, and C#. I want to use

Canvas.SetTop(image, position);

to set the position of this image. However I am given the index of child in my canvas and that is it.

myCanvas.children[index]

I tried

Canvas.SetTop(myCanvas.children[index], position);

but that did not work. How can I change the position of the image given only the index of the image in the canvas?

Edit: Another option would be to change the position of the canvas child. But I couldn't find anything for that.

I have a bunch of images I'm using for a chess game in a canvas using wpf, xaml, and C#. I want to use

Canvas.SetTop(image, position);

to set the position of this image. However I am given the index of child in my canvas and that is it.

myCanvas.children[index]

I tried

Canvas.SetTop(myCanvas.children[index], position);

but that did not work. How can I change the position of the image given only the index of the image in the canvas?

Edit: Another option would be to change the position of the canvas child. But I couldn't find anything for that.

added 116 characters in body
Source Link

I have a bunch of images in a canvas using wpf, xaml, and C#. I want to use

Canvas.SetTop(image, position);

to set the position of this image. However I am given the index of child in my canvas and that is it.

myCanvas.children[index]

I tried

Canvas.SetTop(myCanvas.children[index], position);

but that did not work. How can I change the position of the image given only the index of the image in the canvas?

Edit: Another option would be to change the position of the canvas child. But I couldn't find anything for that.

I have a bunch of images in a canvas using wpf, xaml, and C#. I want to use

Canvas.SetTop(image, position);

to set the position of this image. However I am given the index of child in my canvas and that is it.

myCanvas.children[index]

I tried

Canvas.SetTop(myCanvas.children[index], position);

but that did not work. How can I change the position of the image given only the index of the image in the canvas?

I have a bunch of images in a canvas using wpf, xaml, and C#. I want to use

Canvas.SetTop(image, position);

to set the position of this image. However I am given the index of child in my canvas and that is it.

myCanvas.children[index]

I tried

Canvas.SetTop(myCanvas.children[index], position);

but that did not work. How can I change the position of the image given only the index of the image in the canvas?

Edit: Another option would be to change the position of the canvas child. But I couldn't find anything for that.

Source Link

Getting Image name given a canvas WPF

I have a bunch of images in a canvas using wpf, xaml, and C#. I want to use

Canvas.SetTop(image, position);

to set the position of this image. However I am given the index of child in my canvas and that is it.

myCanvas.children[index]

I tried

Canvas.SetTop(myCanvas.children[index], position);

but that did not work. How can I change the position of the image given only the index of the image in the canvas?