tabcontrol

tabcontrol changing when user clicks on treeview node

眉间皱痕 提交于 2020-02-23 04:33:42
问题 Here is an overview of my application: It is basically a cook book. The user can create a cookbook and then create recipes within that cookbook. I have a class CookBook and a class Recipe. CookBook keeps track of what recipes are associated with the cook book and Recipe keeps track of the contents of the recipe. For the UI, i have a treeview where it will display the recipes that are in the CookBook. I have a TabControl that will display the tabs associated with each recipe. The tabs are

C# Tab Control Empty Space Double Click

三世轮回 提交于 2020-02-21 06:12:32
问题 I am writing a C# WinForm application. I have a Tab Control and I've already preset all functions such as adding new tabs by menu, and double clicking tabs to delete. My issue now is I want to create a tab every time I double click the empty grey space of the tab control. I've been searching for about an hour now and a lot of what I find is dealing with WPF and I'd rather not delve into those anytime soon. So I'm looking for a matter to fit my means of detecting the double click. I've tried

C# Tab Control Empty Space Double Click

自古美人都是妖i 提交于 2020-02-21 06:10:14
问题 I am writing a C# WinForm application. I have a Tab Control and I've already preset all functions such as adding new tabs by menu, and double clicking tabs to delete. My issue now is I want to create a tab every time I double click the empty grey space of the tab control. I've been searching for about an hour now and a lot of what I find is dealing with WPF and I'd rather not delve into those anytime soon. So I'm looking for a matter to fit my means of detecting the double click. I've tried

C# Tab Control Empty Space Double Click

不想你离开。 提交于 2020-02-21 06:08:31
问题 I am writing a C# WinForm application. I have a Tab Control and I've already preset all functions such as adding new tabs by menu, and double clicking tabs to delete. My issue now is I want to create a tab every time I double click the empty grey space of the tab control. I've been searching for about an hour now and a lot of what I find is dealing with WPF and I'd rather not delve into those anytime soon. So I'm looking for a matter to fit my means of detecting the double click. I've tried

C# Tab Control Empty Space Double Click

本秂侑毒 提交于 2020-02-21 06:08:18
问题 I am writing a C# WinForm application. I have a Tab Control and I've already preset all functions such as adding new tabs by menu, and double clicking tabs to delete. My issue now is I want to create a tab every time I double click the empty grey space of the tab control. I've been searching for about an hour now and a lot of what I find is dealing with WPF and I'd rather not delve into those anytime soon. So I'm looking for a matter to fit my means of detecting the double click. I've tried

Cant select Items in Listbox when using Tabcontrol WPF

主宰稳场 提交于 2020-02-04 04:38:45
问题 I have a problem with the selection of items in a Listbox, when the Listbox is in a Tabcontrol. I can't select any item in the Listbox. I am filling the Listbox dynamically via code-behind, also I am using drag and drop on it, though, Drag and drop is working with the tabcontrol. Here is my XAML code: <Window x:Class="SPInstallApp.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:toolkit="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit.Extended"

How can I duplicate tabPage in c#?

元气小坏坏 提交于 2020-02-03 05:39:09
问题 How can I duplicate a "tabPage" inside of my TabControl? I tried this: //My TabControl: tc //My Tab ID: 0 TabPage newPage = new TabPage(); foreach (Control control in tc.TabPages[0].Controls) { newPage.Controls.Add(control); } tc.TabPages.Add(newPage); but it doesn't work. Thanks in advance. 回答1: I got it! For those who has the same kind of problem, Here is what I’ve done: I had created a UserControl (thanks a lot for @SLaks and @Brian for your tip), copied all objects from my TabControl to

Collection was modified; enumeration operation may not execute

一个人想着一个人 提交于 2020-01-24 21:16:07
问题 I have multiple TabItems in my TabControl; tabItem1, tabItem2, tabItem3...these are CloseableTabItem. If I add a node in tabItem1 and press a button to make a subGraph model for this node, the same node should appear in tabItem2 with a button; so that tabItem2-Header = nodeName and nodeName = tabItem1-Header. if i press the button from the node in tabitem2, tabitem1 should be focused. if i close tabItem1 and press the same Button tabItem1 should be loaded again(this happen in SubGraphButton

Binding not working in DataGrid column header when inside non-primary TabItem

只愿长相守 提交于 2020-01-24 19:37:12
问题 I have a DataGrid which has a bound UI control in its header. The binding is to a a field in a view model. The grid is inside a TabControl . When the grid is on the initial tab in the tab control, all works well. However, when the grid isn't on the initial tab, no binding seems to take place. There's no console output, value converters aren't being invoked, trace level logging isn't reporting anything. Here's a trivial, reproducible example: View Model public class ViewModel :

How to get the Document's Title from a Web Browser control in wpf

坚强是说给别人听的谎言 提交于 2020-01-23 12:12:47
问题 I have created a Web Browser control in a TabControl.I want to set the Header of the TabItem to the Document's title of the Web Browser. I used the following code in the Navigated Event of the WebBrowser dynamic doc = tabBrowser.Document; //tabBrowser is the name of WebBrowser Control tab.Header = doc.Title; //tab is the name of the Tab Item But this piece of code doesn't work as it should.The header changes only for a few site. How can i set the Header of the tabItem to the Document's Title