Not sure what Christian is talking about. This seems to work:
<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300">
<Grid>
<Canvas Name="C1">
<Button Name="B1" Canvas.Left="200" Canvas.Top="100" Content="1" />
<Button Name="B2" Canvas.Left="20" Canvas.Top="10" Content="2" />
</Canvas>
</Grid>
</Window>
using System.Windows;
using System.Windows.Controls;
namespace WpfApplication1
{
public partial class Window1 : Window
{
public Window1()
{
InitializeComponent();
string str = Canvas.GetLeft(B1) + "," +
Canvas.GetTop(B1) + "_" + Canvas.GetLeft(B2) +
"," + Canvas.GetTop(B2);
MessageBox.Show(str);
}
}
}