How can I center an element in wpf canvas using attached properties?
Something like this.
double left = (Canvas.ActualWidth - element.ActualWidth) / 2;
Canvas.SetLeft(element, left);
double top = (Canvas.ActualHeight - element.ActualHeight) / 2;
Canvas.SetTop(element, top);