Use LengthConverter I Love Clementine Auto a b c d e f g h i j //File:Window.xaml.cs using System; using System.Windows; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Navigation; using System.Windows.Shapes; using System.Windows.Data; namespace Canvas_Positioning_Properties { public partial class Window1 : Window { public void ChangeLeft(object sender, SelectionChangedEventArgs args) { ListBoxItem li = ((sender as ListBox).SelectedItem as ListBoxItem); LengthConverter myLengthConverter = new LengthConverter(); Double db1 = (Double)myLengthConverter.ConvertFromString(li.Content.ToString()); Canvas.SetLeft(text1, db1); Console.WriteLine(myLengthConverter.ConvertToString(Canvas.GetLeft(text1))); } } }