I have a rectangle in my XAML and want to change its Canvas.Left property in code behind:
Try this
theObject.SetValue(Canvas.LeftProperty, 50d);
There is a group of methods on DependencyObject (base of most WPF classes) which allow the common access to all dependency properties. They are
Edit Updated the set to use a double literal since the target type is a double.