Skip to content

Commit 6a38ee3

Browse files
committed
fix dispatcher using
1 parent 0075ed8 commit 6a38ee3

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ sdkInstance = AdFactory.GetInstance("vungleTest");
5656
private async void SdkInstance_OnAdPlayableChanged(object sender, AdPlayableEventArgs e)
5757
{
5858
//Run asynchronously on the UI thread
59-
await CoreApplication.MainView.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
59+
await this.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
6060
new DispatchedHandler(() => someMethod()));
6161
}
6262
```

Windows 8.1 Samples/CS_sample_Windows8.1/MainPage.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ private async void SdkInstance_OnAdPlayableChanged(object sender, AdPlayableEven
3030
{
3131
adPlayable = e.AdPlayable;
3232
//Run asynchronously on the UI thread
33-
await CoreApplication.MainView.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
33+
await this.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
3434
new DispatchedHandler(() => ChangeButtonsState()));
3535
}
3636

Windows Phone 8.1 Samples/CS_sample_WP8.1/MainPage.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ private async void SdkInstance_OnAdPlayableChanged(object sender, AdPlayableEven
3333
{
3434
adPlayable = e.AdPlayable;
3535
//Run asynchronously on the UI thread
36-
await CoreApplication.MainView.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
36+
await this.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
3737
new DispatchedHandler(() => ChangeButtonsState()));
3838
}
3939

Windows Universal Samples/CS_sample/MainPage.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ private async void SdkInstance_OnAdPlayableChanged(object sender, AdPlayableEven
3131
{
3232
adPlayable = e.AdPlayable;
3333
//Run asynchronously on the UI thread
34-
await CoreApplication.MainView.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
34+
await this.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
3535
new DispatchedHandler(() => ChangeButtonsState()));
3636
}
3737

Windows Universal Samples/VB_sample/MainPage.xaml.vb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Public NotInheritable Class MainPage
1919
Private Async Sub OnAdPlayable_EventHandler(sender As Object, args As AdPlayableEventArgs) Handles sdkInstance.OnAdPlayableChanged
2020
adPlayable = args.AdPlayable
2121
'Run asynchronously on the UI thread'
22-
Await CoreApplication.MainView.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
22+
Await Me.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
2323
New DispatchedHandler(AddressOf ChangeButtonsState))
2424

2525
End Sub

0 commit comments

Comments
 (0)