ButchersBoy / Dragablz

Dragable and tearable tab control for WPF
http://dragablz.net
MIT License
2.17k stars 320 forks source link

MoveWindowWithSolitaryTabs issue #264

Open dcembala opened 2 years ago

dcembala commented 2 years ago

I have a problem involving moving window with tab. In my app I have one tab that is fixed (FixedHeaderCount=1). User can add/remove aditional tabs. I dont want tabs to be dragable so i set InterTabController = null but doing so causes an issue when user tryies to frag fixed tab whole window is being dragged. This is caused by MoveWindowWithSolitaryTabs being placed on InterTabController. This feature I beliewe is controlled in: private bool ShouldDragWindow(DragablzItemsControl sourceOfDragItemsControl) { return (Items.Count == 1 && (InterTabController == null || InterTabController.MoveWindowWithSolitaryTabs) && !Layout.IsContainedWithinBranch(sourceOfDragItemsControl)); } I think it might be better to change InterTabController == null || => InterTabController != null && or to move MoveWindowWithSolitaryTabs component so InterTabController wouldnt be necesary to disable window drag. Or maybe there is other way to disable window drag I'm not aware of?