Skip to content

Commit 88072a4

Browse files
committed
Remove Address getter from IWebBrowser
Make Address private on ChromiumWebBrowser Still allows for full data binding under MVVM as users will directly access the control in xaml, from a view model they're likely to bind through a Property that is data bound to address and everywhere there's a reference to IWebBrowser then Load(string url) can be called in code
1 parent d29baa0 commit 88072a4

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

CefSharp.WinForms/ChromiumWebBrowser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public class ChromiumWebBrowser : Control, IWebBrowserInternal, IWinFormsWebBrow
1919
public string Title { get; set; }
2020
public bool IsLoading { get; private set; }
2121
public string TooltipText { get; private set; }
22-
public string Address { get; set; }
22+
public string Address { get; private set; }
2323

2424
public IDialogHandler DialogHandler { get; set; }
2525
public IJsDialogHandler JsDialogHandler { get; set; }

CefSharp/IWebBrowser.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,12 @@ public interface IWebBrowser : IDisposable
139139
bool CanReload { get; }
140140

141141
/// <summary>
142-
/// The address (URL) which the browser control is currently displaying. Can be set to a simplified URL
143-
/// (e.g. www.google.com) or a full URL (e.g. http://www.google.com). Will automatically be updated as the user
144-
/// navigates to another page (e.g. by clicking on a link).
142+
/// The address (URL) which the browser control is currently displaying.
143+
/// Will automatically be updated as the user navigates to another page (e.g. by clicking on a link).
145144
/// </summary>
146145
/// <remarks>In the WPF control, this property is implemented as a Dependency Property and fully supports data
147146
/// binding.</remarks>
148-
string Address { get; set; }
147+
string Address { get; }
149148

150149
/// <summary>
151150
/// The title of the web page being currently displayed.

0 commit comments

Comments
 (0)