New feature suggestions

Coordinator
Aug 15, 2009 at 9:30 PM

If you guys are interested in using FabTab but would like to see some new features added to it, feel free to post your suggestions to this thread.

Thanks,

adajos

Sep 16, 2009 at 6:55 PM

Great project and with newer prism drops one can use FabTab as a region. If the content panel closed when one clicked on the content tab the control's behavior would be more like internet explorer.

Thanks for your efforts.

mike

Coordinator
Sep 16, 2009 at 9:58 PM

Thanks Mike.

Glad to hear it works with PRISM, I think PRISM is great.

As far as the IE behavior, I noticed then when the IE quick tab is visible and the user clicks anywhere other than on the little screenshots inside of it, then it switches back to the previously selected tab---in effect in IE the quick tab is not treated identically to the rest of the tabs. I didn't like that, because the quick tab looks like a normal tab to the user, and yet it's a tab that gets deselected without the user deliberately clicking on a different tab.  Therefore, I purposely steered away from that, wanting the FabTab ContentTab to behave identically to the rest of the tabs.

That being said, if you are wanting to make FabTab work more like IE in that regard others probably will want that too.  I may be able to add that as a feature. 

Thanks,

adajos

Sep 24, 2009 at 7:56 PM

Hey,

Ive used this project in a thing I'm working on and I love how it works/looks, big upgrade from old winforms tabs. One thing that would be awsome though is drag/drop functionallity so you can actively rearrange the order of tabs.

Coordinator
Sep 24, 2009 at 8:10 PM
butters877 wrote:

Hey,

Ive used this project in a thing I'm working on and I love how it works/looks, big upgrade from old winforms tabs. One thing that would be awsome though is drag/drop functionallity so you can actively rearrange the order of tabs.

Hi butters877,

I'm glad you like FabTab.  I like the idea of being able to reorder the tabs via drag and drop so thanks for the suggestion.  I will try to add that feature to the next release.

BTW, thanks for uploading your patch--I am new to Codeplex and did not have email notifications turned on for patches, so I didn't notice that until today.

adajos

Sep 24, 2009 at 10:26 PM

Hi,

FabTabs are awesome and way more useful than winform tabs, thanks. One feature suggestion I would have is making the tab name of the selected tab fully visible all the time. Like when you have a bunch of tabs open shrink the names of all the others, but keep the current one full width.

Sep 24, 2009 at 11:05 PM

I like zrahls concept for the tab naming... also another cool idea i had would be to add functionallity for when you hover over a tab, it displays a drop down image of the tab's contents, kinda like how a tool tip displays information. Hmm i really like this project

 

Coordinator
Sep 25, 2009 at 12:53 AM
zrahl7 wrote:

Hi,

FabTabs are awesome and way more useful than winform tabs, thanks. One feature suggestion I would have is making the tab name of the selected tab fully visible all the time. Like when you have a bunch of tabs open shrink the names of all the others, but keep the current one full width.

 Hey zrahl7,

Good idea--I'm disappointed that I didn't think of that myself.  That should actually be quite easy, as I already figured out how to have all the tab headers other than the ContentTab header shrink--it shouldn't be hard to make the currently-selected tab not shrink either.  I'll put that in the next release for sure.

Thanks,

adajos

Coordinator
Sep 25, 2009 at 1:02 AM
butters877 wrote:

I like zrahls concept for the tab naming... also another cool idea i had would be to add functionallity for when you hover over a tab, it displays a drop down image of the tab's contents, kinda like how a tool tip displays information. Hmm i really like this project

 

 Hey butters877,

Just to clarify your suggestion, let me state back what I think you just said. 

When a user hovers over a tab header then a tooltip pops up that contains a small screenshot of the tab's actual content, much like the screenshots shown on the ContentTab's view inside the buttons.  Presumably that behavior would not occur for the currently selected tab--and maybe not for the ContentTab either. The idea is that you can get a quick glimpse of what's in a given tab without actually selecting it merely by hovering over the tab's header.  Hmmm....should be doable--would have to clone the image with the screenshot since it's logical parent is already a button on the ContentTab view, but that shouldn't be a big deal.  Little things like that can definitely have a significant impact on the perception of an app's usability for the user.

I'll add it to my list. 

BTW, anyone reading this thread, if someone has already suggested a feature that you want, please chime in anyway with your vote for that particular feature.  The more people want a given feature, the more likely it'll make it in.

Sep 25, 2009 at 5:12 AM

I think butter's idea is pretty neat, Opera does that and its pretty useful and it would be an awesome addition. I would envision that like you describe it adajos, with the preview hovering over all tabs besides the content tab and the selected tab. It would also be useful if over the image the whole name would be displayed.  Also looking back at tejana's post I agree with adajos, it would be pretty annoying to click on the whitespace and be taken out of the content tab.

Coordinator
Sep 26, 2009 at 9:00 PM

Hey guys,

I just added some new changesets (found underneath the Source Code tab) that add some features we've discussed here.  Firstly, if more tabs are added (or the width allotted to the FabTabControl decreases) the ContentTab header and the header the selected tab do not have their width decreased, but all the other tab headers do lose some width.  Then if you select a different tab, that tab header gets to show its entire width and the previosly-selected tab header gets narrowed.

Additionally I added a tool tip over the non-selected non-ContentTab tab headers.  Now if you hover over a tab's header, the tooltip that pops up contains a screenshot of that tabs' actual contents.  Right now, the size of that tool tip's image is not configurable, but that may come about in the future.  If such tooltips are not desired, the ShowToolTipImages property on the FabTabControl itself can be set to false and they will not show up.  This is illustrated in NoTabCloseWindow.xaml in the SampleProject in the latest change set.

Also I applied a patch courtesy of butters877 that allows the ContentTabView to take screenshots of tab content that contains WinForms interop.

These changes will all make the next release.  I will also examine the possibility of adding the ability to reorder the tabs by dragging/dropping the tab headers--I suspect that might be a non-trivial task.

Enjoy,

adajos

Sep 29, 2009 at 12:04 AM

Thanks for all the new updates adajos, looked at all the new stuff and it looks awsome much more... "professional" feeling I guess is the term for it. I did find one bug but im uploading the fix for it for you to take a look at soon (involved updating the new tool-tip images). Thanks for all the effort you've put into this project

-Butters877

Coordinator
Sep 30, 2009 at 4:30 AM

Major thanks to butters for finding  and proposing a solution to the bug he referred to above.  Basically the nice new screenshot tooltips were only being refreshed when the ContentTab was selected.  Thus if you made a change on Tab A that caused the tab content to look different (say, typing something into a textbox) and then selected Tab B, hovering over Tab A's header would result in showing an out-of-date screenshot in the tooltip.

I've committed a fix for this issue.  Under the Source Code tab, just download the latest changeset (30716 at the time I'm writing this).  We'll have to keep an eye on performance impact in the future, as all tab screenshots get updated when OnSelectionChanged gets fired in the FabTabControl.  Looks fine for now, so I will worry about optimizing performance if and when performance issues are brought to my attention.

Nov 7, 2009 at 10:05 PM

Really nice control, I want to use the control in a prism application and it would be great if the tabs were dockable.   If this is already possible if you could let me know how this would be accomplished.

Thanks

Coordinator
Nov 7, 2009 at 10:17 PM

Hey brent1291,

Thanks for the feedback.  I know some FabTab users have successfully used FabTab in a prism application as a region.  I have not personally tried it though, I should probably get around to doing that.

As far as the tabs being dockable, they do not support that functionality right now.  It would be a great feature to add though.  I will do some research and try to see how much work would be involved in doing that.  Are you going to be unable to use FabTab in your prism app because you need dockable tabs?

Nov 15, 2009 at 3:43 PM
Edited Nov 16, 2009 at 1:52 AM

An example of a prism app shell with the fab tab filling the bottom:

<Window x:Class="Tejana.Shell"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:cal="http://www.codeplex.com/CompositeWPF"
    xmlns:tab="clr-namespace:FabTab;assembly=FabTab"
    Title="Shell" Height="300" Width="300">
    <Grid>
        <DockPanel>
            <ItemsControl DockPanel.Dock="Top"
                      cal:RegionManager.RegionName="MainMenu">
            </ItemsControl>
            <ItemsControl DockPanel.Dock="Top"
                      cal:RegionManager.RegionName="MainTitle">
            </ItemsControl>
            <tab:FabTabControl
                      TabStripPlacement="Top"
                      Width="Auto"
                      Height="Auto"
                      cal:RegionManager.RegionName="MainRegion">
             </tab:FabTabControl>
        </DockPanel >
    </Grid>
</Window>

Mike

Coordinator
Nov 16, 2009 at 3:49 PM

Hey thanks Mike!  That will probably save some people a lot of time.

Nov 25, 2009 at 4:06 PM

This looks really good.

Would it be possible to add a TabLeaving event so one could stop the user leaving a Tab if there was invalid data? This was a major omission by Microsoft - but what's new!

Coordinator
Nov 30, 2009 at 11:47 PM
mickS wrote:

This looks really good.

Would it be possible to add a TabLeaving event so one could stop the user leaving a Tab if there was invalid data? This was a major omission by Microsoft - but what's new!

 Thanks mickS.  By the way, I love that suggestion.  I'll see what I can do.

Dec 28, 2009 at 11:14 AM

I know that this is licensed under Apache 2.0 and I know that no answer from internet can replace a laywer.
Even so, can Fabtab be used in commercial applications and in which conditions?

Thanks!

Coordinator
Dec 28, 2009 at 4:11 PM

Hi emipasat,

My intention is that FabTab be used in both commercial and non-commercial applicaitons.  My understanding of the Apache 2 license is that it can be used for commercial purposes.  Reading the wikipedia entry on Apache 2 license here might be helpful to you as well.  Just don't sue me if a bug in the code causes problems with your app ;)

Thanks for your interest, I hope it can be of use to you.  If nothing else, perhaps certain parts of my source could get you the functionality that you need.

Mar 19, 2010 at 6:47 PM
Edited Mar 19, 2010 at 6:49 PM

I would Like to suggest making the tabstrip scrollable, in case you have alot of tabs open. I'd say maybe squish the tabs to a min width, then show an arrow button at the end to bring the other tabs into view. Of course you would have to watch out to make sure that when you change the selected tab index, that the tab is scrolled into view on the top.

Coordinator
Mar 22, 2010 at 3:30 PM

shaboboo,

I will keep that in mind.  I've considered it before, the only thing is that I would need the ContentTab to not appear within the scrollable area--otherwise that kind of defeats the purpose of having a quick way to see all the tabs if you need to scroll just to find the ContentTab.

I'll consider it.

Thanks,

Josh

Apr 19, 2010 at 2:10 PM

Hi again Josh !

What do you think about "tools" to help the developer to manage the tabs saving ?

I think about different things like :

  • A boolean on each TabItems which indicates if the content of the tab has been changed since the last save;
  • A boolean on the TabControl which indicates if at least one TabItem has been modified since the last save;
  • A graphical sign that watch a TabItem is not saved (like a star * after the name).

I have seen two events on TabItem : SourceUpdated / TargetUpdated. It seems that they are invoked when a Source / Target which is used in a binding on this element is updated.
Maybe that those two events can be used to set the TabItem's boolean when something is modified. It supposed that there's something binded to the Tab but I think that it can work. I just think because I'm a newbie with WPF. :p

After that, when the TabClosing event is raised, the developer has just to check if the Tab is saved with the boolean and if not, he can purpose to the user to save the tab before closing it and he just have to put everything he wants to make its save.
If the TabControl closing event is raised (probably when the window is closed), we can check if at least one tab is not saved and stop the closing on the TabControl so the user can save the tab if he wants.

My interrogation is on the two events SourceUpdated and TargetUpdated. Can they be used to change the value of the "IsSaved" boolean on a TabItem. I will try to test it today or tomorrow but do you think that it can be a good add to FabTab ?

Regards,
Tuttu

Coordinator
Apr 19, 2010 at 11:43 PM

Tuttu,

It's not a bad idea, but I think it's best to keep this UI control as flexible as possible.  Many users will want to do their own implementations of the sort of thing you are proposing, so I find it best to leave that functionality to the user.  In order for the FabTabControl itself to detect whether a tab's content has changed, I'd probably need to require consumers of the control to make their UserControls implement a certain interface so that FabTab could communicate with them to determine if anything has changed.

By exposing the TabClosing event the idea is the app using FabTab can handle the event.  That app code can check to see if the FabTabItem's Content implements an interface or is a certain concrete type and figure out if the tab has been changed or not.  The TabClosing event is cancellable, so it should be straightforward for the app to display a prompt to the user asking whether they are sure they want to save their changes or not--depending on the user's answer you can cancel the event.  This functionality is demonstrated in the Sample Project if you click on the "Open CancelCloseEventWindow" and you can look at the source to see how that is accomplished.

As far as how you can determine if your custom views displayed in FabTabItems have been changed--you've got a few choices: have the domain object that your UserControl binds to have a boolean flag ("IsDirty") that gets set to true in all the property setters that you bind to.  Or you could simply detect keystrokes at the level of the individual controls in your UserControl--it really depends on what exactly your app needs.  Because different apps will have different requirements, I choose to leave that kind of functionality out of FabTab and left to the app developer's discretion.

In the future I may similarly create a TabLeaving event that gets fired anytime the user selects a new tab--that way there could be an extensibility point for developers to check to see if their data is valid and possibly prompt the user to fix their data before allow them to switch to another tab.

Josh

 

Apr 20, 2010 at 7:45 AM

Thank you for the information. I will continue to test what I need to detect a change in my tab content and try to implement everything needed  to make a proper save.