Skip to content

Commit 20bd345

Browse files
merceyzamaitland
authored andcommitted
WinForms: Prevent designer from setting any default values (#2265)
1 parent c8d725f commit 20bd345

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

CefSharp.WinForms/ChromiumWebBrowser.cs

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ public class ChromiumWebBrowser : Control, IWebBrowserInternal, IWinFormsWebBrow
6060
/// MUST ONLY be cleared by DefaultFocusHandler.
6161
/// </summary>
6262
/// <value><c>true</c> if this instance is activating; otherwise, <c>false</c>.</value>
63-
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
63+
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DefaultValue(false)]
6464
public bool IsActivating { get; set; }
6565

6666
/// <summary>
6767
/// Gets or sets the browser settings.
6868
/// </summary>
6969
/// <value>The browser settings.</value>
70-
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
70+
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DefaultValue(null)]
7171
public BrowserSettings BrowserSettings { get; set; }
7272
/// <summary>
7373
/// Gets or sets the request context.
@@ -97,13 +97,13 @@ public IRequestContext RequestContext
9797
/// <value><c>true</c> if this instance is loading; otherwise, <c>false</c>.</value>
9898
/// <remarks>In the WPF control, this property is implemented as a Dependency Property and fully supports data
9999
/// binding.</remarks>
100-
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
100+
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DefaultValue(false)]
101101
public bool IsLoading { get; private set; }
102102
/// <summary>
103103
/// The text that will be displayed as a ToolTip
104104
/// </summary>
105105
/// <value>The tooltip text.</value>
106-
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
106+
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DefaultValue(null)]
107107
public string TooltipText { get; private set; }
108108
/// <summary>
109109
/// The address (URL) which the browser control is currently displaying.
@@ -112,26 +112,26 @@ public IRequestContext RequestContext
112112
/// <value>The address.</value>
113113
/// <remarks>In the WPF control, this property is implemented as a Dependency Property and fully supports data
114114
/// binding.</remarks>
115-
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
115+
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DefaultValue(null)]
116116
public string Address { get; private set; }
117117

118118
/// <summary>
119119
/// Implement <see cref="IDialogHandler" /> and assign to handle dialog events.
120120
/// </summary>
121121
/// <value>The dialog handler.</value>
122-
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
122+
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DefaultValue(null)]
123123
public IDialogHandler DialogHandler { get; set; }
124124
/// <summary>
125125
/// Implement <see cref="IJsDialogHandler" /> and assign to handle events related to JavaScript Dialogs.
126126
/// </summary>
127127
/// <value>The js dialog handler.</value>
128-
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
128+
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DefaultValue(null)]
129129
public IJsDialogHandler JsDialogHandler { get; set; }
130130
/// <summary>
131131
/// Implement <see cref="IKeyboardHandler" /> and assign to handle events related to key press.
132132
/// </summary>
133133
/// <value>The keyboard handler.</value>
134-
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
134+
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DefaultValue(null)]
135135
public IKeyboardHandler KeyboardHandler { get; set; }
136136
/// <summary>
137137
/// Implement <see cref="IRequestHandler" /> and assign to handle events related to browser requests.
@@ -143,31 +143,31 @@ public IRequestContext RequestContext
143143
/// Implement <see cref="IDownloadHandler" /> and assign to handle events related to downloading files.
144144
/// </summary>
145145
/// <value>The download handler.</value>
146-
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
146+
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DefaultValue(null)]
147147
public IDownloadHandler DownloadHandler { get; set; }
148148
/// <summary>
149149
/// Implement <see cref="ILoadHandler" /> and assign to handle events related to browser load status.
150150
/// </summary>
151151
/// <value>The load handler.</value>
152-
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
152+
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DefaultValue(null)]
153153
public ILoadHandler LoadHandler { get; set; }
154154
/// <summary>
155155
/// Implement <see cref="ILifeSpanHandler" /> and assign to handle events related to popups.
156156
/// </summary>
157157
/// <value>The life span handler.</value>
158-
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
158+
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DefaultValue(null)]
159159
public ILifeSpanHandler LifeSpanHandler { get; set; }
160160
/// <summary>
161161
/// Implement <see cref="IDisplayHandler" /> and assign to handle events related to browser display state.
162162
/// </summary>
163163
/// <value>The display handler.</value>
164-
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
164+
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DefaultValue(null)]
165165
public IDisplayHandler DisplayHandler { get; set; }
166166
/// <summary>
167167
/// Implement <see cref="IContextMenuHandler" /> and assign to handle events related to the browser context menu
168168
/// </summary>
169169
/// <value>The menu handler.</value>
170-
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
170+
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DefaultValue(null)]
171171
public IContextMenuHandler MenuHandler { get; set; }
172172
/// <summary>
173173
/// Implement <see cref="IRenderProcessMessageHandler" /> and assign to handle messages from the render process.
@@ -179,7 +179,7 @@ public IRequestContext RequestContext
179179
/// Implement <see cref="IFindHandler" /> to handle events related to find results.
180180
/// </summary>
181181
/// <value>The find handler.</value>
182-
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
182+
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DefaultValue(null)]
183183
public IFindHandler FindHandler { get; set; }
184184

185185
/// <summary>
@@ -191,13 +191,13 @@ public IRequestContext RequestContext
191191
/// needing to override the logic in OnGotFocus. The implementation in
192192
/// DefaultFocusHandler relies on very detailed behavior of how WinForms and
193193
/// Windows interact during window activation.</remarks>
194-
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
194+
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DefaultValue(null)]
195195
public IFocusHandler FocusHandler { get; set; }
196196
/// <summary>
197197
/// Implement <see cref="IDragHandler" /> and assign to handle events related to dragging.
198198
/// </summary>
199199
/// <value>The drag handler.</value>
200-
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
200+
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DefaultValue(null)]
201201
public IDragHandler DragHandler { get; set; }
202202
/// <summary>
203203
/// Implement <see cref="IResourceHandlerFactory" /> and control the loading of resources
@@ -209,7 +209,7 @@ public IRequestContext RequestContext
209209
/// Implement <see cref="IGeolocationHandler" /> and assign to handle requests for permission to use geolocation.
210210
/// </summary>
211211
/// <value>The geolocation handler.</value>
212-
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
212+
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DefaultValue(null)]
213213
public IGeolocationHandler GeolocationHandler { get; set; }
214214

215215
/// <summary>
@@ -294,31 +294,31 @@ public IRequestContext RequestContext
294294
/// <value><c>true</c> if this instance can go forward; otherwise, <c>false</c>.</value>
295295
/// <remarks>In the WPF control, this property is implemented as a Dependency Property and fully supports data
296296
/// binding.</remarks>
297-
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
297+
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DefaultValue(false)]
298298
public bool CanGoForward { get; private set; }
299299
/// <summary>
300300
/// A flag that indicates whether the state of the control current supports the GoBack action (true) or not (false).
301301
/// </summary>
302302
/// <value><c>true</c> if this instance can go back; otherwise, <c>false</c>.</value>
303303
/// <remarks>In the WPF control, this property is implemented as a Dependency Property and fully supports data
304304
/// binding.</remarks>
305-
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
305+
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DefaultValue(false)]
306306
public bool CanGoBack { get; private set; }
307307
/// <summary>
308308
/// A flag that indicates whether the WebBrowser is initialized (true) or not (false).
309309
/// </summary>
310310
/// <value><c>true</c> if this instance is browser initialized; otherwise, <c>false</c>.</value>
311311
/// <remarks>In the WPF control, this property is implemented as a Dependency Property and fully supports data
312312
/// binding.</remarks>
313-
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
313+
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DefaultValue(false)]
314314
public bool IsBrowserInitialized { get; private set; }
315315

316316
/// <summary>
317317
/// A flag that indicates if you can execute javascript in the main frame.
318318
/// Flag is set to true in IRenderProcessMessageHandler.OnContextCreated.
319319
/// and false in IRenderProcessMessageHandler.OnContextReleased
320320
/// </summary>
321-
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
321+
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never), DefaultValue(false)]
322322
public bool CanExecuteJavascriptInMainFrame { get; private set; }
323323

324324
/// <summary>

0 commit comments

Comments
 (0)