1 instantiation of BehaviorService
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\DocumentDesigner.cs (1)
708
_behaviorService = new
BehaviorService
(Component.Site, _frame);
134 references to BehaviorService
System.Design (1)
artifacts\obj\System.Design.Facade\Release\net10.0\System.Design.Forwards.cs (1)
72
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Windows.Forms.Design.Behavior.
BehaviorService
))]
System.Windows.Forms.Design (127)
System\ComponentModel\Design\DesignerActionUI.cs (2)
29
private
BehaviorService
_behaviorService; // this is how all of our UI is implemented (glyphs, behaviors, etc...)
57
if (!serviceProvider.TryGetService(out
BehaviorService
? behaviorService) ||
System\Windows\Forms\Design\Behavior\Adorner.cs (2)
16
private
BehaviorService
? _behaviorService; // ptr back to the BehaviorService
32
public
BehaviorService
? BehaviorService
System\Windows\Forms\Design\Behavior\AdornerCollection.cs (2)
14
private readonly
BehaviorService
? _behaviorService;
19
public BehaviorServiceAdornerCollection(
BehaviorService
? behaviorService)
System\Windows\Forms\Design\Behavior\Behavior.cs (2)
17
private readonly
BehaviorService
? _behaviorService;
27
protected Behavior(bool callParentBehavior,
BehaviorService
? behaviorService)
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.cs (2)
16
private readonly
BehaviorService
_behaviorService;
24
internal AdornerWindow(
BehaviorService
behaviorService, DesignerFrame designerFrame)
System\Windows\Forms\Design\Behavior\BehaviorService.MenuCommandHandler.cs (2)
12
private readonly
BehaviorService
_owner;
15
public MenuCommandHandler(
BehaviorService
owner, IMenuCommandService menuService)
System\Windows\Forms\Design\Behavior\ContainerSelectorBehavior.cs (3)
21
private
BehaviorService
_behaviorService; // ptr to where we start our drag/drop operation
51
_behaviorService = (
BehaviorService
)serviceProvider.GetService(typeof(
BehaviorService
));
System\Windows\Forms\Design\Behavior\DesignerActionKeyboardBehavior.cs (1)
15
public DesignerActionKeyboardBehavior(DesignerActionPanel? panel, IServiceProvider? serviceProvider,
BehaviorService
behaviorService)
System\Windows\Forms\Design\Behavior\DragAssistanceManager.cs (2)
22
private readonly
BehaviorService
_behaviorService;
148
_behaviorService = serviceProvider.GetRequiredService<
BehaviorService
>();
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (10)
41
private readonly
BehaviorService
_behaviorServiceSource; // ptr back to the BehaviorService in the drop source
42
private
BehaviorService
_behaviorServiceTarget; // ptr back to the BehaviorService in the drop target
87
_behaviorServiceSource = (
BehaviorService
)_serviceProviderSource.GetService(typeof(
BehaviorService
));
327
_behaviorServiceTarget = (
BehaviorService
)_serviceProviderTarget.GetService(typeof(
BehaviorService
));
672
_behaviorServiceTarget = (
BehaviorService
)_serviceProviderTarget.GetService(typeof(
BehaviorService
));
871
private void GetParentSnapInfo(Control parentControl,
BehaviorService
bhvSvc)
898
private void DisableAdorners(IServiceProvider serviceProvider,
BehaviorService
behaviorService, bool hostChange)
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (4)
28
private
BehaviorService
_behaviorService;
68
private
BehaviorService
BehaviorService
72
_behaviorService ??= (
BehaviorService
)_serviceProvider.GetService(typeof(
BehaviorService
));
System\Windows\Forms\Design\Behavior\SelectionManager.cs (3)
19
private
BehaviorService
_behaviorService;
40
/// components change. Also, we create our custom <see cref="Adorner" /> and add it to the <see cref="
BehaviorService
" />.
42
public SelectionManager(IServiceProvider serviceProvider,
BehaviorService
behaviorService)
System\Windows\Forms\Design\Behavior\TableLayoutPanelBehavior.cs (3)
17
private readonly
BehaviorService
_behaviorService; // used for bounds translation
35
_behaviorService = serviceProvider.GetService(typeof(
BehaviorService
)) as
BehaviorService
;
System\Windows\Forms\Design\Behavior\ToolboxItemSnapLineBehavior.cs (4)
20
private readonly
BehaviorService
_behaviorService; // pointer to our big & bad service
33
public ToolboxItemSnapLineBehavior(IServiceProvider serviceProvider,
BehaviorService
behaviorService)
45
public ToolboxItemSnapLineBehavior(IServiceProvider serviceProvider,
BehaviorService
behaviorService, ControlDesigner controlDesigner)
55
public ToolboxItemSnapLineBehavior(IServiceProvider serviceProvider,
BehaviorService
behaviorService, ControlDesigner controlDesigner, bool allowDragBox)
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionBehavior.cs (2)
15
private readonly
BehaviorService
_behaviorService;
22
_behaviorService = serviceProvider.GetRequiredService<
BehaviorService
>();
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionGlyph.cs (2)
13
private readonly
BehaviorService
? _behaviorService;
28
_behaviorService = _provider?.GetService<
BehaviorService
>();
System\Windows\Forms\Design\CommandSet.cs (3)
51
private
BehaviorService
? _behaviorService; // demand created pointer to the behaviorservice
228
protected
BehaviorService
? BehaviorService => _behaviorService ??= GetService<
BehaviorService
>();
System\Windows\Forms\Design\ComponentTray.cs (4)
171
if (GetService(typeof(
BehaviorService
)) is
BehaviorService
behSvc)
2610
private readonly
BehaviorService
_behaviorSvc;
2615
public ComponentTrayGlyphManager(
BehaviorService
behaviorSvc)
System\Windows\Forms\Design\ControlDesigner.cs (3)
34
private
BehaviorService
? _behaviorService; // we cache this 'cause we use it so often
73
protected
BehaviorService
? BehaviorService => _behaviorService ??= GetService<
BehaviorService
>();
System\Windows\Forms\Design\DataGridViewColumnDesigner.cs (3)
16
private
BehaviorService
? _behaviorService;
148
_behaviorService = GetService<
BehaviorService
>();
294
public FilterCutCopyPasteDeleteBehavior(bool callParentBehavior,
BehaviorService
behaviorService) : base(callParentBehavior, behaviorService) { }
System\Windows\Forms\Design\DesignerFrame.cs (6)
31
private
BehaviorService
? _behaviorService;
63
private
BehaviorService
? BehaviorService => _behaviorService ??= _designerSite.GetService<
BehaviorService
>();
345
private
BehaviorService
? _behaviorService;
366
private
BehaviorService
? BehaviorService => _behaviorService ??= _provider.GetService<
BehaviorService
>();
System\Windows\Forms\Design\DesignerToolStripControlHost.cs (2)
18
private
BehaviorService
? _behaviorService;
44
_behaviorService = site.GetRequiredService<
BehaviorService
>();
System\Windows\Forms\Design\DocumentDesigner.cs (2)
29
private
BehaviorService
_behaviorService;
485
host.RemoveService<
BehaviorService
>();
System\Windows\Forms\Design\FormDocumentDesigner.cs (1)
444
GetService<
BehaviorService
>()?.SyncSelection();
System\Windows\Forms\Design\ToolStripAdornerWindowService.cs (3)
18
private
BehaviorService
_behaviorService;
30
_behaviorService = (
BehaviorService
)serviceProvider.GetService(typeof(
BehaviorService
));
System\Windows\Forms\Design\ToolStripDesigner.cs (1)
2061
GetService<
BehaviorService
>()?.ProcessPaintMessage(r);
System\Windows\Forms\Design\ToolStripDesignerUtils.cs (3)
481
BehaviorService
behaviorService = (
BehaviorService
)provider.GetService(typeof(
BehaviorService
));
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (3)
145
GetService<
BehaviorService
>()?.Invalidate(bounds);
318
if (TryGetService(out
BehaviorService
_))
681
if (TryGetService(out
BehaviorService
behaviorService))
System\Windows\Forms\Design\ToolStripEditorManager.cs (3)
22
private readonly
BehaviorService
_behaviorService;
39
_behaviorService = (
BehaviorService
)comp.Site.GetService(typeof(
BehaviorService
));
System\Windows\Forms\Design\ToolStripItemBehavior.cs (8)
87
BehaviorService
bSvc = GetBehaviorService(item);
125
private static
BehaviorService
GetBehaviorService(ToolStripItem item)
130
BehaviorService
behaviorSvc = (
BehaviorService
)item.Site.GetService(typeof(
BehaviorService
));
282
BehaviorService
bSvc = GetBehaviorService(glyphItem);
815
BehaviorService
bSvc = GetBehaviorService(currentDropItem);
920
BehaviorService
bSvc = GetBehaviorService(item);
System\Windows\Forms\Design\ToolStripItemDesigner.cs (14)
196
GetService<
BehaviorService
>()?.SyncSelection();
327
BehaviorService
behaviorService = GetService<
BehaviorService
>();
514
if (TryGetService(out
BehaviorService
b) && ImmediateParent is not null)
578
Rectangle parentBounds = GetService<
BehaviorService
>().ControlRectInAdornerWindow((Control)ImmediateParent);
873
BehaviorService
windowService = (
BehaviorService
)newItem.Site.GetService(typeof(
BehaviorService
));
920
&& TryGetService(out
BehaviorService
behaviorService))
1014
GetService<
BehaviorService
>().Invalidate(parentDropDown.Bounds);
1022
if (TryGetService(out
BehaviorService
behaviorService))
1222
BehaviorService
behaviorService = GetService<
BehaviorService
>();
1315
if (TryGetService(out
BehaviorService
behaviorService))
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (9)
622
BehaviorService
behaviorService = (
BehaviorService
)_provider.GetService(typeof(
BehaviorService
));
775
BehaviorService
behaviorService = (
BehaviorService
)_provider.GetService(typeof(
BehaviorService
));
1138
BehaviorService
behaviorService = (
BehaviorService
)_provider.GetService(typeof(
BehaviorService
));
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (7)
1079
GetService<
BehaviorService
>()?.ProcessPaintMessage(r);
1102
GetService<
BehaviorService
>()?.Invalidate();
1188
GetService<
BehaviorService
>()?.Invalidate(invalidatingRegion);
1614
GetService<
BehaviorService
>()?.Invalidate(MenuItem.Owner.Bounds);
2797
BehaviorService
bSvc = (
BehaviorService
)primaryItem.Site.GetService(typeof(
BehaviorService
));
System\Windows\Forms\Design\ToolStripTemplateNode.cs (6)
92
private
BehaviorService
_behaviorService;
364
private
BehaviorService
BehaviorService
368
_behaviorService ??= (
BehaviorService
)_component.Site.GetService(typeof(
BehaviorService
));
574
if (svcProvider.GetService(typeof(
BehaviorService
)) is
BehaviorService
bSvc)
System.Windows.Forms.Design.Tests (6)
ControlDesignerTests.cs (4)
232
BehaviorService
behaviorService = new(mockServiceProvider.Object, mockDesignerFrame.Object);
269
BehaviorService
behaviorService = new(mockServiceProvider.Object, mockDesignerFrame.Object);
270
_designer._mockSite.Setup(s => s.GetService(typeof(
BehaviorService
))).Returns(behaviorService);
299
BehaviorService
behaviorService = new(mockServiceProvider.Object, mockDesignerFrame.Object);
TestControlDesigner.cs (1)
19
internal
BehaviorService
GetBehaviorServiceProperty()
ToolStripDesignerTests.cs (1)
32
mockSite.Setup(s => s.GetService(typeof(
BehaviorService
))).Returns(null);