tabcontrol

Get a property of a tabitem's viewmodel when it's selected

僤鯓⒐⒋嵵緔 提交于 2019-12-12 01:48:56
问题 I have a UserControl ParentView containing a DataGrid and a catel:TabControl , in which each TabItem is a tiny UserControl and whose ViewModel is a subclass of a BaseTabViewModel . This BaseTabViewModel contains a ObservableCollection of a custom class, whose properties will generate the columns of the DataGrid . Since I have only one DataGrid for all tabs, how can I fill it with the ObservableCollection of selected tab's viewmodel automatically? Right now, I just unload tabs ( LoadTabItems=

Filemaker Pro: Create multiple entries of a table with Tab Control

心不动则不痛 提交于 2019-12-12 01:45:02
问题 I'm currently designing a Filemaker Pro database for a clinical trial. The relationship between my different tables are done. To simplify my issue, let say I've two tables. I've a "info" table with the PatientID and general informations about this patient and I have another table with "day" results. The "info" and "day" tables are linked by a PatientID field. The "day" table has a variable "dayID" for discerning the collecting day of the data. We're going to collect data for this patient

How to create a static TabControl in XAML WPF

时光毁灭记忆、已成空白 提交于 2019-12-11 19:11:40
问题 I need to create a TabControl in MainWindow, and then I need to make a Property in MainWindow that returns that TabControl. I don't know how to access TabControl from another window because it says "An object reference is required bla bla..." when I try like this: MainWindow.tabcontrol.Items.Add("tabitem"); and the Property I made in MainWindow is: public TabControl tabcontrol { get { return tabc; } set{ tabc = value;} } Values are: "tabcontrol" is name of Property "tabc" is name of

Loaded event doesn't fire for the 4th TabControl tab

泄露秘密 提交于 2019-12-11 18:51:48
问题 I'm pretty new to WPF and I'm working on a small C# application that has a WPF TabControl with 4 tabs. I'm doing some minor things in each tab when the tab loads (loading combo box values, etc.) but I'm having a problem with the 4th tab not firing the Loaded event.I've verified that the position is the problem by switching the order around among the four tabs. Whatever tab is in the last position will not fire the Loaded event, whatever tabs are in the first three positions are working fine.

C# Winforms Tabpage Size and ClientSize wrong

强颜欢笑 提交于 2019-12-11 17:34:58
问题 I have created a user control that contains a TabControl with 2 TabPages. The position of the child controls on both TabPages is adapted programmatically in the Layout event of the user control. The problem is, that the 2nd TabPage has not been drawn yet when the event is called and therefore this TabPage has a wrong Size and ClientSize. How can I work around that? I tried a loop with var oHandle = tabpage.Handle and tabctrl.SelectedTab = each tabpage already to force the creation of the

C# error provider not working on textboxes in groupbox and tabcontrols

夙愿已清 提交于 2019-12-11 16:59:09
问题 I am trying to implement using error provider to validate that my text boxes are not empty before proceeding with execution. Error provider works on textboxes on the main form but refuses to work on any textbox or combo box that is in a groupbox or tabcontrol. It doesn't check the text boxes, it doesn't display error or waits until the user enter text/select item for the controls that are being checked. Sure if I loose the groupbox or tabcontrol I would get the error check working as normal

How to convert TabControl into wizard style in .NET?

ⅰ亾dé卋堺 提交于 2019-12-11 16:47:26
问题 I want to have my form in a wizard style and so I used TabControl to have the pages of the Wizard as my TabPages. There were small issues to be corrected, such as, making the tabs being displayed in runtime. I inherited the TabControl and I added a property called "TabsVisible" and corrected it. It worked fine. (See : http://dotnetrix.co.uk/tabcontrol.htm - Add a HideTabs property to turn on/off the Tabitems) But there are other small issues like : 1. When Ctrl + Tab is pressed the tabs get

Binding TabControl to ObservableCollection With Different Content

爷,独闯天下 提交于 2019-12-11 15:02:27
问题 'm trying to create w mainwindow that will have a tabcontrol containing multiple items ( each one is shown only on demand )... let's say we have item of type A, item of type B and item of type C I want ( using MVVM pattern) to have an observablecollection of objects that represent my tabitems and that are related to my userscontrols ( each tabitem is a usercontrol)... The problem is that i didn't figure out how to do it. i've a tabItemViewModelBase class : public class TabItemViewModelBase :

Opening and Closing Tab Pages via Checkbox

…衆ロ難τιáo~ 提交于 2019-12-11 14:10:08
问题 I am working on Windows Forms app using C#. The main form contains TabControl and checkboxes. The tab pages of the TabControl contains child forms. Then the checkboxes shall open and close specific tab pages on check and uncheck, respectively. The tab pages initially do not exist on load. Here is what I did (child form is Form3 and the concerned TabControl is tabForms): private void checkBox1_CheckStateChanged(object sender, EventArgs e) { Form1 f1 = new Form1(); f1.TopLevel = false; TabPage

WPF TabControl ControlTemplate

一笑奈何 提交于 2019-12-11 12:37:52
问题 I'm looking to create a new control template for a WPF tabcontrol. The situation I have is that there will be a number of tabs in the control and the user will be able to add and delete these tabs. Ideally I would like to create something along the lines of the Firefox / IE tabs whereby you have a delete button inside the tab heading to delete the current tab. Also, and slightly more complicated, I want to have a new tab button that is always on the right hand side of the last tab in the