We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Hide propery bar only for one window

Thread ID:

Created:

Updated:

Platform:

Replies:

47839 Aug 14,2006 07:42 AM Aug 29,2006 01:59 AM Windows Forms 13
loading
Tags: Tools
Artjom Orehov
Asked On August 14, 2006 07:42 AM

Hello,

Syncfusion has public the DockingManager.ShowCaption property that allows to hide/show the property bar for all dockable windows, but in my application I need to hide propery bar only for the one window. What the method should I use to support such functionality?

p.s. Now, to avoid this problem, I use ugly structure with 2 linked docking managers and splitter window. This is works as I want, exclude LoadDockState: method is failed to restore state if restored window was moved to the another manager.

WBR, Artjom

Joy K George [Syncfusion]
Replied On August 14, 2006 12:55 PM

Hi Artjom,

You may handle the following events to achieve your requirement.


//Handling the event DockStateChanged
private void dockingManager_DockStateChanged(object sender, DockStateChangeEventArgs arg)
{
//panel1 is the docked control whose property bar is to be hidden
DockHost dh = panel1.Parent as DockHost;
DockHostController dhc = dh.InternalController as DockHostController;
dhc.HideCaption = true;
}

private void dockingManager_NewDockStateEndLoad(object sender, EventArgs e)
{
DockHost dh = panel1.Parent as DockHost;
DockHostController dhc = dh.InternalController as DockHostController;
dhc.HideCaption = true;
}

Please try this method and let me know,if you need more assistance.

Regards,
Joy

Administrator [Syncfusion]
Replied On August 14, 2006 03:26 PM

Thanks for a quick response - now it works fine and I can continue evaluate your product.

p.s. Why DockHost & DockStateControllerBase* aren''t documented? There are many interesting things.

p.p.s one additional question - can I have a custom caption bar? For example, if i want to have control like XPTaskPane as standart Essential Tools dockable window I need to control a caption bar.

WBR, Artjom

Murugan [Syncfusion]
Replied On August 16, 2006 11:57 AM

Hi Artjom,
Custom caption bar can be created using the event ProvideGraphicsItems. It is fired whenever the caption bar is drawn. EventArgs has three properties for custom drawings.
CaptionBackground - used to set background for the caption bar.
CaptionForeground - used to set foreground of the caption bar.
CaptionFont - To set font styles.

private void dockingManager1_ProvideGraphicsItems(object sender, Syncfusion.Windows.Forms.Tools.ProvideGraphicsItemsEventArgs arg)
{
if(arg.IsActiveCaption == true)
{
arg.CaptionBackground = new LinearGradientBrush(arg.CaptionBounds, Color.Lavender , Color.White, (float)0);
arg.CaptionForeground = Color.Red;
arg.CaptionFont = new Font("Arial", 10, FontStyle.Bold);
}
else
{
arg.CaptionBackground = new LinearGradientBrush(arg.CaptionBounds, Color.Bisque, Color.White, (float)0);
arg.CaptionFont = new Font("Arial", 10);
}
}

Herewith I have attached the sample and KB link for your reference.Please go through this and let me know if you have queries.

How to draw a custom caption for docking windows?


CustomCaptionBar.zip

Thanks,
Murugan P.S

Administrator [Syncfusion]
Replied On August 17, 2006 02:49 AM

Hi, Murugan P S

Im not sure that this event is enough for my task:

My caption bar should have an active areas and I need to drawing it (not only change background but full GDI+ abilities) and also react on the user input on its (clicking, mouse moving etc).

WBR,Artjom

Malarvizhi [Syncfusion]
Replied On August 17, 2006 07:36 AM

Hi Artjom,


The DockingManager.ProviderGraphicItems event have a feature for customozing the Docked control captionbar Foreground,Background, Font alone. There is no feature to support GDI.

The DockingManager.ProviderGraphicItems event occurs whenever a dockable control''s caption need to be painted. There is no feature to handle the Click and MouseHover event.


Thank you for your interest.Let me Know,if you have queries

Regards,
Malarvizhi

Administrator [Syncfusion]
Replied On August 18, 2006 03:04 AM

oh,As I understand there is no way to have fully custom caption bar?

WBR, Artjom

Joy K George [Syncfusion]
Replied On August 18, 2006 10:30 AM

Hi Artjom,

Could you please let us know whether you want the Graphics object of Caption? So that you could perform all GDI+ operations on caption.


Regards,
Joy

Administrator [Syncfusion]
Replied On August 21, 2006 03:11 AM

>Could you please let us know whether you want the >Graphics object of Caption? So that you could >perform all GDI+ operations on caption.
Sure, all what I need it is a Graphics object for custom painting and mouse&keyboard events.

WBR,

Joy K George [Syncfusion]
Replied On August 21, 2006 04:39 AM

Hi Artjom,

We will try creating a sample with the existing DockingManager to meet your requirement.If that is not possible ,we are ready to take as a feature request.
I will update you by Thursday with more details.
Regards,
Joy

Malarvizhi [Syncfusion]
Replied On August 24, 2006 09:32 AM

Hi Artjom,

We added a new event named CaptionPaint Event for Cutomizing the Docked control Captionbar.

The DockingManager.CustomPaint Event will be fired after the DockingManager.ProvideGraphicItems Event.

The DockingManager.CaptionPaint EventHandler receives an argument of type PainEventArgs which support all GDI operation on the caption of the Docked control.

I have attached sample, please go through that,let me know you need further assistance.

CustomCaption.zip



Regards,
Malarvizhi.

Malarvizhi [Syncfusion]
Replied On August 24, 2006 09:34 AM

Hi Artjom,

We added a new event named CaptionPaint Event for Cutomizing the Docked control Captionbar.

The DockingManager.CustomPaint Event will be fired after the DockingManager.ProvideGraphicItems Event.

The DockingManager.CaptionPaint EventHandler receives an argument of type PainEventArgs which support all GDI operation on the caption of the Docked control.

I have attached sample, please go through that,let me know you need further assistance.

CustomCaption.zip



Regards,
Malarvizhi.

Administrator [Syncfusion]
Replied On August 24, 2006 10:35 AM

Your sample does that I want,but by absolutly unexpectedly way :).
Am learning more and more about ETools internals.

As I see , to process mouse & keyboard events I should override the following DockHost methods:

public void HandleDoubleClick(Point ptscreen);
public void HandleMouseDown(MouseButtons ...etc

Thank you for quick and detailed answers. Am satisfied and your company obtains a new customer just now - we will order licenses soon.

Malarvizhi [Syncfusion]
Replied On August 29, 2006 01:59 AM

Hi Artjom,

We added a new event named MouseEvent for handling the click event to customizing the Docked control captionbar.

The DockingManager.MouseEvent will be fired,when the caption bar of the Docked control is clicked.

The DockingManager.MouseEvent handler receives an argument of type MouseEventArgs to handle the left mouse button click event for paintaing the docked control caption bar.

I have attached sample,please go through that,let me know you need further assistance.

CustomCaption.zip


Regards,
Malarvizhi.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;