public static List <CustomImage> GetIndividualSensorVisuals(Tile[,] tiles, bool draggable = true) { var imgList = new List <CustomImage>(); for (var tileX = 0; tileX < tiles.GetLength(0); tileX++) { for (var tileY = 0; tileY < tiles.GetLength(1); tileY++) { var tile = tiles[tileX, tileY]; var tempTileList = new Tile[1, 1]; tempTileList[0, 0] = tile; var img = new CustomImage { Source = BitmapToImageSource( ConstructSensorDataBackground(tempTileList)), }; img.SetValue(DraggableExtender.CanDragProperty, draggable); img.TileData = tile; img.InCanvasPosition = (new System.Windows.Point( (tileX * tile.Sensors.GetLength(0)) * 3, (tileY * tile.Sensors.GetLength(1)) * 3)); RenderOptions.SetBitmapScalingMode(img, BitmapScalingMode.NearestNeighbor); imgList.Add(img); } } return(imgList); }