Comments (7)
ok...taking a look...
from dragablz.
whoa fast reply, it actually doesn't work when I put it in this statement, sorry for incomplete information
foreach (Dragablz.TabablzControl tabablzControl in Controllers.Windows.Windows.FindVisualChildren<Dragablz.TabablzControl>(this))
{
foreach (TabItem aTabItem in tabablzControl.Items)
{
if (aTabItem.Name.Equals("aTabItem"))
{
aTabItem.IsSelected = true;
}
}
}
from dragablz.
You caught me at a good time, I was just getting on the computer!
from dragablz.
ah cool.. also when adding new tabitem via code and then selecting it via selectedindex generate same issue, content changed but the header still selecting first tabitem. here's my code.
TabItem aTabItem = new TabItem();
aTabItem.Name = "aTabItem";
aTabItem.Header = "Second Tab";
aTabItem.AllowDrop = true;
mainTabControl.Items.Insert(mainTabControl.Items.Count, aTabItem);
mainTabControl.SelectedIndex = mainTabControl.Items.Count - 1;
i've tried many things without changing your library but ended up with nothing :(
cheers..
from dragablz.
OK, same fix fixes both problems. Small thing though, when you do .Insert(), TabablzControl is "cleverly" putting the new tab next to the currently selected tab (and not at the end which is kinda implied by your example). If this is an issue for you raise another issue and I'll take a look in due course.
Fix is checked into GitHub and look for build 0.0.0.101 on NuGet. Let me know if it works for you and I'll close the issue.
Thanks,
James
from dragablz.
Great, I can now select TabItem properly with both IsSelected and SelectedIndex.
Do you mean that index parameter in .Insert() doesn't have any effect, adding new TabItem will put it straight to the next of current selected tab ignoring index parameter?
Cheers
from dragablz.
Yep that's what I meant. I close this issue.
from dragablz.
Related Issues (20)
- TabablzControl crashes when no tab items are present
- close button can't show HOT 1
- Dockablz layout does not show Dropzones when inside NavigationView
- Need to update SecondaryAccentBrush to SecondaryHueMidBrush
- Tabablz Item Template unable to set Tab title. Just shows as path to item template source HOT 1
- [Question] drag and drop between two or more lists HOT 2
- Documentation of classes
- MoveWindowWithSolitaryTabs issue
- TabablzControl SelectedIndex binding catches all exception from bound property
- Button in TabItem header
- is there a way to make dragablztabcontrol NOT TEARABLE?
- Layout: Cannot change FloatingItem Content
- How we can do this? : Open forms in different threads and then move the mainwindow all other forms must be move with them in wpf.
- MDI: New added floating item will not show at the front.
- .Net 7 Issue
- Throws System.Reflection.TargetInvocationException while dragging a tab when the tabs are created using ItemsSource.
- handling Default close button HOT 1
- Equal width for all tabs
- Brush renames on MaterialDesignInXAML 5.0.0 HOT 1
- Disposing closed tab
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dragablz.