2 writes to _component
System.Windows.Forms.Design (2)
System\ComponentModel\Design\ComponentDesigner.cs (2)
378
_component
= component;
461
_component
= null;
10 references to _component
System.Windows.Forms.Design (10)
System\ComponentModel\Design\ComponentDesigner.cs (10)
38
if (
_component
?.Site is { } site)
40
PropertyDescriptor? defaultProperty = TypeDescriptor.GetDefaultProperty(
_component
);
46
if (defaultProperty.TryGetValue(
_component
, out string? currentValue) && string.IsNullOrEmpty(currentValue))
48
defaultProperty.SetValue(
_component
, site.Name);
172
public IComponent Component =>
_component
?? throw new InvalidOperationException("Designer is not initialized");
177
[MemberNotNullWhen(true, nameof(
_component
))]
178
private protected bool HasComponent =>
_component
is not null;
365
_component
is not null,
368
return TryGetService(out IDesignerHost? host) &&
_component
== host.RootComponent;
557
protected virtual object? GetService(Type serviceType) =>
_component
?.Site?.GetService(serviceType);