File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,13 @@ namespace CefSharp.Wpf
3131 /// <seealso cref="System.Windows.Controls.Control" />
3232 /// <seealso cref="CefSharp.Internals.IRenderWebBrowser" />
3333 /// <seealso cref="CefSharp.Wpf.IWpfWebBrowser" />
34+ [ TemplatePart ( Name = PartImageName , Type = typeof ( Image ) ) ]
35+ [ TemplatePart ( Name = PartPopupImageName , Type = typeof ( Image ) ) ]
3436 public class ChromiumWebBrowser : Control , IRenderWebBrowser , IWpfWebBrowser
3537 {
38+ private const string PartImageName = "PART_image" ;
39+ private const string PartPopupImageName = "PART_popupImage" ;
40+
3641 /// <summary>
3742 /// The source
3843 /// </summary>
@@ -1924,12 +1929,12 @@ public override void OnApplyTemplate()
19241929 if ( image == null )
19251930 {
19261931 // Create main window
1927- image = ( Image ) GetTemplateChild ( "PART_image" ) ;
1932+ image = ( Image ) GetTemplateChild ( PartImageName ) ;
19281933 }
19291934
19301935 if ( popupImage == null )
19311936 {
1932- popupImage = ( Image ) GetTemplateChild ( "PART_popupImage" ) ;
1937+ popupImage = ( Image ) GetTemplateChild ( PartPopupImageName ) ;
19331938 }
19341939 }
19351940
You can’t perform that action at this time.
0 commit comments