TiledSharp - Tile Properties

I’m trying to use TiledSharp in my game but I can’t figure out how to access the individual custom tile properties, I checked the example programs and none of them use this functionality.
Please advise!

A quick look at the source revealed a “Properties” property of a TmxTilesetTile.

After reading over the source code and trying a few different things I’m still lost. It looks like the Properties are stored in a Dictionary class, so I try to access them like so:

map = new TmxMap("Content/exmapleMap.tmx");

foreach (var item in map.Tilesets[0].Properties)
{
    Console.WriteLine(item.Key);
    Console.WriteLine(item.Value);
}

not sure if it’s relevant but my tmx file looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" orientation="orthogonal" renderorder="right-down" width="14" height="14" tilewidth="32" tileheight="32" nextobjectid="2">
 <tileset firstgid="1" name="tiles" tilewidth="32" tileheight="32" tilecount="4" columns="4">
  <image source="tiles.png" width="128" height="32"/>
  <tile id="0">
   <properties>
    <property name="collidable" type="bool" value="false"/>
   </properties>
  </tile>
  <tile id="1">
   <properties>
    <property name="ass" value="ffff"/>
    <property name="chest" type="bool" value="true"/>
    <property name="collidable" type="bool" value="true"/>
   </properties>
  </tile>
  <tile id="2">
   <properties>
    <property name="collidable" type="bool" value="true"/>
   </properties>
  </tile>
  <tile id="3">
   <properties>
    <property name="collidable" type="bool" value="true"/>
   </properties>
  </tile>
 </tileset>
 <layer name="Tile Layer 1" width="14" height="14">
  <data encoding="csv">
1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,3,1,1,1,1,1,1,1,3,1,1,
1,1,3,4,3,1,1,1,2,1,3,4,3,1,
1,1,1,4,1,1,1,1,1,1,1,4,1,1,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4,
4,4,4,4,4,4,4,4,4,4,4,4,4,4
</data>
 </layer>
</map>

Also, thanks for your reply Jjagg, I feel like it was a nudge in the right direction at least!

You’re looking at the properties dict of the tileset itself rather than those of the tiles it contains. Try using the Tiles property to get the tiles

foreach (var tile in map.Tilesets[0].Tiles) 
{
    foreach (var prop in tile.Properties) 
    {
        Console.WriteLine(prop.Key);
        Console.WriteLine(prop.Value);
    }
}