This is a migrated thread and some comments may be shown as answers.
DoubleClick in a Tabbed Document
1 Answer 39 Views
This is a migrated thread and some comments may be shown as answers.
simtemp
Top achievements
Rank 1
simtemp asked on 05 Apr 2010, 12:18 PM
Hi,
how to close a DocumentWindow DoubleClicking the TabHeader

TIA

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 08 Apr 2010, 10:19 AM
Hi simtemp,

You can subscribe to the Click event of DocumentWindow.TabStripItem and check whether the time span between the clicks is small enough:

public Form1()
{
    InitializeComponent();
  
    this.documentWindow1.TabStripItem.Click += new EventHandler(TabStripItem_Click);
}
  
DateTime startClick = DateTime.MinValue;
  
void TabStripItem_Click(object sender, EventArgs e)
{
    DateTime currentTime = DateTime.Now;
    TimeSpan span = currentTime - startClick;
    if (span.TotalMilliseconds < SystemInformation.DoubleClickTime)
    {
        this.radDock1.CloseWindow(this.documentWindow1);
    }
    startClick = currentTime;
}


All the best,
Nikolay
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Dock
Asked by
simtemp
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or