question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BindingNavigator no longer appears in the Toolbox (and does not have a designer)

See original GitHub issue

Environment

Problem identified on Visual Studio

  • Version 17.4.1
  • Version 16.11.19

.NET version

.NET 5 .NET 6 .NET 7

Did this work in a previous version of Visual Studio and/or previous .NET release?

Was working on .NET 4.x

Issue description

When creating a new form, you cannot choose to add a BindingNavigator : he is not available in the Toolbox. If you add it manually in the Designer file, it works correctly, but you do not benefit of the designer calling the “AddStandardItems” to automatically add the first buttons.

I don’t know if this is related, but when investigating in the source code, the BindingNavigator refers to the BindingNavigatorDesigner class (in System.Design 4.0.0.0), but there is no Type Forwarding to the new System.Windows.Forms.Design dll and anyway, the designer does not exist in that new DLL.

I also tried to create a class inheriting from BindingNavigator (see below).

[Designer(typeof(MediaBindingNavigatorDesigner))]
public class MediaBindingNavigator : BindingNavigator
{
    [EditorBrowsable(EditorBrowsableState.Never)]
    public MediaBindingNavigator() { }
    public MediaBindingNavigator(BindingSource bindingSource) : base(bindingSource) { }
    [EditorBrowsable(EditorBrowsableState.Never)]
    public MediaBindingNavigator(IContainer container) : base(container) { }
    public MediaBindingNavigator(bool addStandardItems) : base(addStandardItems: addStandardItems) { }
}

I tried to create my own custom designer to be able to at least call the AddStandardItems methods, but for some reason I don’t understand, this designer is not used at design time.

I have the following warning displaying (see full log in the diags below) [22:07:40.7412379] [ACQ]: warn: Microsoft.DotNet.DesignTools.TypeRouting.TypeRoutingService[0] [22:07:40.7412379] [ACQ]: Falling back to ‘Microsoft.DotNet.DesignTools.Designers.ControlDesigner’ for ‘ACQ.MediaBindingNavigatorDesigner’

Steps to reproduce

  • Create a new .NET Windows Forms app
  • Open the newly created Form1
  • Open the Toolbox --> The BindingNavigator is not present

When going to the “Choose Items”, you can see that the BindingNavigator is correctly selected. Deselect it and open the “Choose Items” windows --> Still checked

Diagnostics

[22:07:40.7372505] Sending request: Controls/GetAncestors
[22:07:40.7382394] Controls/GetAncestors took 00:00:00.0013195.
[22:07:40.7392394] Sending request: Transactions/Open
[22:07:40.7402385] Transactions/Open took 00:00:00.0010285.
[22:07:40.7402385] Notifying 1 'Undo/UndoUnitCreated' handlers
[22:07:40.7402385] 'Undo/UndoUnitCreated' notification received: Creating components in tool 'MediaBindingNavigator'.62aa060d-3693-42d5-9986-819f26c5b264
[22:07:40.7402385] Notifying 1 'Transactions/Opening' handlers
[22:07:40.7402385] Notifying 1 'Transactions/Opened' handlers
[22:07:40.7402385] Sending request: DesignerHosts/CreateComponent
[22:07:40.7412379] [ACQ]: warn: Microsoft.DotNet.DesignTools.TypeRouting.TypeRoutingService[0]
[22:07:40.7412379] [ACQ]:       Falling back to 'Microsoft.DotNet.DesignTools.Designers.ControlDesigner' for 'ACQ.MediaBindingNavigatorDesigner'
[22:07:40.7538628] DesignerHosts/CreateComponent took 00:00:00.0136782.
[22:07:40.7538628] Notifying 1 'Components/Added' handlers
[22:07:40.7548765] Sending request: Objects/GetAttributes [137]
[22:07:40.7579094] Objects/GetAttributes took 00:00:00.0027005.
[22:07:40.7579094] Added designer component: 'mediaBindingNavigator2'
[22:07:40.7579094] Notifying 1 'Components/Changing' handlers
[22:07:40.7579094] 'Components/Changing' notification received: mediaBindingNavigator2.Text
[22:07:40.7579094] Sending request: Objects/GetProperties
[22:07:40.7913385] Objects/GetProperties took 00:00:00.0329720.
[22:07:40.7923383] Notifying 1 'Components/Changed' handlers
[22:07:40.7923383] 'Components/Changed' notification received: mediaBindingNavigator2.Text
[22:07:40.7923383] Notifying 1 'Components/Changing' handlers
[22:07:40.7923383] 'Components/Changing' notification received: Form1.Controls
[22:07:40.7933519] Notifying 1 'Components/Changing' handlers
[22:07:40.7933519] 'Components/Changing' notification received: mediaBindingNavigator2.Size
[22:07:40.7933519] Notifying 1 'Components/Changed' handlers
[22:07:40.7933519] 'Components/Changed' notification received: mediaBindingNavigator2.Size
[22:07:40.7943368] Notifying 1 'Components/Changing' handlers
[22:07:40.7943368] 'Components/Changing' notification received: mediaBindingNavigator2.Location
[22:07:40.7943368] Notifying 1 'Components/Changed' handlers
[22:07:40.7943368] 'Components/Changed' notification received: mediaBindingNavigator2.Location
[22:07:40.7943368] Notifying 1 'Components/Changed' handlers
[22:07:40.7943368] 'Components/Changed' notification received: Form1.Controls
[22:07:40.7953366] Notifying 1 'Components/Changing' handlers
[22:07:40.7953366] 'Components/Changing' notification received: mediaBindingNavigator2.Text
[22:07:40.7953366] Notifying 1 'Components/Changed' handlers
[22:07:40.7953366] 'Components/Changed' notification received: mediaBindingNavigator2.Text
[22:07:40.7963361] Sending request: Transactions/Close: Cancel = False
[22:07:40.7973221] Transactions/Close took 00:00:00.0009933.
[22:07:40.7973221] Notifying 1 'Transactions/Closing' handlers
[22:07:40.7973221] Notifying 1 'Undo/UndoUnitAdded' handlers
[22:07:40.7973221] 'Undo/UndoUnitAdded' notification received: 62aa060d-3693-42d5-9986-819f26c5b264
[22:07:40.7973221] Notifying 1 'Transactions/Closed' handlers
[22:07:40.8003341] Updating selection in server process.
[22:07:40.8003341] Sending request: Selection/UpdateSelection
[22:07:40.8003341] [ACQ]: info: Microsoft.DotNet.DesignTools.Host.RemoteSelectionService[0]
[22:07:40.8003341] [ACQ]:       Attempting to update selection: 1 components, Replace
[22:07:40.8043510] [ACQ]: info: Microsoft.DotNet.DesignTools.Host.RemoteSelectionService[0]
[22:07:40.8043510] [ACQ]:       Made change: True
[22:07:40.8043510] Selection/UpdateSelection took 00:00:00.0046853.
[22:07:40.8043510] Notifying 1 'Selection/Changed' handlers
[22:07:40.8053509] Sending request: Properties/GetValue
[22:07:40.8103481] Properties/GetValue took 00:00:00.0046069.
[22:07:40.8113492] Sending request: Controls/GetParent
[22:07:40.8123471] Controls/GetParent took 00:00:00.0007074.
[22:07:40.8123471] Sending request: Controls/GetParent
[22:07:40.8123471] Controls/GetParent took 00:00:00.0006207.
[22:07:40.8123471] Sending request: Controls/GetParent
[22:07:40.8133471] Controls/GetParent took 00:00:00.0005641.
[22:07:40.8143548] Sending request: Commands/HasLockedControl
[22:07:40.8153551] Commands/HasLockedControl took 00:00:00.0005484.
[22:07:41.1534121] Sending request: Designers/GetDesignerVerbs
[22:07:41.1554152] Designers/GetDesignerVerbs took 00:00:00.0014788.
[22:07:41.1554152] Sending request: Designers/GetDesignerActionLists
[22:07:41.1564145] Designers/GetDesignerActionLists took 00:00:00.0011682.
[22:07:41.8184104] [ACQ]: Sending request to remove roots:
[22:07:41.8184104] [ACQ]:   - f1: 2 root(s).
[22:07:41.8184104] Sending request: Objects/RemoveObjectRoots
[22:07:41.8194139] Objects/RemoveObjectRoots took 00:00:00.0007642.

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
despiojocommented, Apr 20, 2023

@merriemcgaw @deinok Hi there, we also need this issue resolved ASAP, we have junior developers unable to create controls, code-behind (one in particular), it’s tremendously frustrating.

1reaction
pedautreppecommented, Nov 17, 2022

Thanks @merriemcgaw for the feedback ! Yes indeed, bringing back the designer would be great. It helps a lot when dealing with BindingNavigator. By the way, it would also help to expose the different designers as public classes and not internal ones. Much easier when we need to extend one behavior ! 😉

When the blog post is ready, can you also publish a link here ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

C# Visual Studio Microsoft 2022 BindingNavigator not ...
1 Answer. I can't speak for Visual Studio 2022 but Visual Studio 2019 does not have a BindingSource available in the toolbox for...
Read more >
Thread: [RESOLVED] BindingNavigator Missing from Toolbar
I am using .NET 5.0 to create a desktop application. I do not see the BindingNavigator control in the toolbox under Data, All...
Read more >
Winform Net5 Designer Toolbox
Yes, the BindingNavigator control is not supported in .NET 5 Winforms project form designer yet, that's a known issue. What's the 'Button ...
Read more >
VS 2019 - About half the Toolbox is disabled. : r/VisualStudio
I imported a Form with BindingNavigator and BindingSource from a VS 2017 project. Neither appears on the Form in 2019, but both appear...
Read more >
Data source wizard in .NET 6 - Microsoft Q&A
Toolbox only two datatools present: BindingSource and DataGridView from the original five shown when using .NET 4.8, which are: Chart, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found