Windows 10, VS 2019 Community, VB.Net...
I'm wanting to use a listview control as a custom menu. Created a usercontrol, added a listview and populated it with groups and items in each group. I then added it to a ToolStripControlHost, and this was in turn added to a ContextMenuStrip which serves as the dropdown for a menu item on my form. Works fine except that the groups don't show up. The listview items are there but no groups. What might cause this? This image:
shows the usercontrol in the designer and also at runtime. Thanks in advance.
Related
i was wondering if it was possible to hide everything at once in windows forms, i was planning to use a drop down which made things appear and disappear but i wanted everything hidden at the beginning for simplicity.
Thanks!
On the form, add a Panel control (found in the Containers section of the toolbox).
Set the Visible value of the Panel to be False.
Add all controls inside this panel. You can then make the panel visible and hidden via code. (no need to cycle through all controls on the form)
I've taken over a project, which contains some UltraWinGrid controls on some of the forms.
On one of the original forms which has been there since before I took on the project, there is a ContextMenuStrip, which has just one ContextMenuToolstripItem on it, captioned 'Default for Column'.
This ContextMenuStrip is hidden by default, however, when the user right-clicks on the UltraGrid, the ContextMenuStripItem is displayed on the grid (rather than at the top of them form where the ContextMenuStrip is).
I'm trying to replicate this behaviour in a new form that I've added myself, however, after adding the ContextMenuToolstripItem in, I cannot get it to display when right-clicking my grid.
I've put a breakpoint on every subroutine in the in the older forms class, and none of them are triggered when right-clicking it.
Additionally I have also searched the class for DefaultForColumnToolstripMenuItem, and the only place it appears is in the Click event of the ContextMenuToolStripItem itself.
So, how else is it possible to show it when right-clicking the grid? I've copy and pasted the ContextMenuStrip from the old form onto the new form and still nothing occurred.
I'm assuming it's in a property somewhere that I'm missing?
Check for a ContextMenuStrip property on the UltraWinGrid. You can set it in the designer and your context menu will appear on right click without having to deal with the MouseClick handler, checking the mousebutton used, etc.
Is there any XAML control that supports data binding except listview or listbox. I am developing an application using windows azure mobile services table. After retrieving the data from table I am binding the list to a listview as a small preview. When user will select any Item from the list view I want to display the details of the selected item. Which XAML control will be suitable for this task. I can use lots of TextBoxes and assign its Text property from C# code. I dont think It is a good practice. Thank you
If it's a better collection viewer you are looking for for, use a DataGrid. If you want to show more info, it's worth making another panel and showing more data there about the selected item (master detail pattern)
All XAML controls support data bindings. Use DataContext if you want children to access the binding, otherwise you can bind directly on the property.
For example, you could have a separate panel that is a Grid with a few child controls. This Grid's DataContext can be set to the DataGrid's SelectedItem, then it's child controls can easily bind to the item's properties.
I am trying to create my first WP8 application. I have good experience on Silverlight & WPF however this is not a cake for me which I expected :(.
I am making a Create Employ Form in which user entered different information of the employ. I need to show Country List Combobox. I noticed that in WP8, I will have to use LongListSelector but I am confused that how will I display it with my other textboxes etc control into the FORM. LongListSelector work on the full page but I want to show it like a ComboBox in simple window form application.
I know this is very basic question but I will appreciate for your help.
you cant use combobox in wp8 ...
you can use ListPicker it is a new control introduced in wp8 toolkit...
in this if your list contains less than 5 members than it will show it as dropdown otherwise it will show it as a list on a different page.
Set the Height and Width properties for Lonlistselector or otherwise change the control ListPicker simmler to CombooBox.
In Visual Studio 2008, using VB .NET, I have a Split Container that I want to dynamically load panels into the Panel2 slot from other team member's work based on user input in the Panel1 controls.
Can my team members work on panels outside of a form, save it, then have the main Form just load those panels when needed without copying and pasting each panel into the form and making them visible and invisible?
Thanks.
Sure, have the team build user controls which you will then add to the control collection for the panel.