File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
src/Avalonia.WebView2/Controls Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ static unsafe Handler CreateViewHandler(WebView2 wv2)
2727 }
2828 else
2929 {
30- return = createViewHandler ( wv2 ) ;
30+ return createViewHandler ( wv2 ) ;
3131 }
3232 }
3333
@@ -55,9 +55,6 @@ internal Handler(WebView2 webView2)
5555 protected override IPlatformHandle CreateNativeControlCore ( IPlatformHandle parent )
5656 {
5757#if ANDROID
58- var parentContext = GetContext ( parent ) ;
59- var view = CreatePlatformView ( parentContext ) ;
60- wv2 . SetValue ( view ) ;
6158 return this ;
6259#elif IOS || MACCATALYST || ( MACOS && ! USE_DEPRECATED_WEBVIEW )
6360 var view = CreatePlatformView ( ) ;
Original file line number Diff line number Diff line change @@ -73,6 +73,8 @@ protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e)
7373 if ( viewHandler == null )
7474 {
7575 viewHandler = CreateViewHandler ( this ) ;
76+ var view = viewHandler . CreatePlatformView ( ) ;
77+ SetValue ( view ) ;
7678 Child = viewHandler ;
7779 }
7880#elif IOS || MACCATALYST || ( MACOS && ! USE_DEPRECATED_WEBVIEW )
You can’t perform that action at this time.
0 commit comments