public void ClickAddShapeButton() { if (_pane != null && _pane.GetAddShapeButton() != null) { // Perform clicking of button on its own UI thread UIThreadExecutor.Execute(() => { _pane.GetAddShapeButton().PerformClick(); }); } }
public void ClickAddShapeButton() { if (_pane == null || _pane.GetAddShapeButton() == null) { return; } // Perform clicking of button on its own UI thread UIThreadExecutor.Execute(() => { _pane.GetAddShapeButton().RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent)); }); }