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