private async void BitmapImageOpened(object sender, ImageOpenedEventArgs e) { await DispatcherUtil.RunAsync(Dispatcher, () => { var handler = ImageOpened; if (handler != null) { handler(this, e); } }); }
protected void InvokeImageOpened() { if (Source != null) { var handler = ImageOpened; if (handler != null) { var arg = new ImageOpenedEventArgs() { PixelHeight = Source.PixelHeight, PixelWidth = Source.PixelWidth }; handler(this, arg); } } }