I want feature like UltraToolBarManager will dock at top as well as bottom.
So By Default setting is pnlToolBar.Dock = DockStyle.Top
I want pnlToolBar.Dock = DockStyle.Bottom also after drag end toolbar.
So I used below code in that case docking is working at top and bottom but two time mouse enter will happen:
'Private Sub UltraToolbarsManager1_MouseEnterElement(sender As System.Object, e As Infragistics.Win.UIElementEventArgs) Handles UltraToolbarsManager1.MouseEnterElement
If Me.pnlToolBar.MousePosition.Y > Me.Parent.Height / 2 Then
Me.pnlToolBar.Dock = DockStyle.Bottom
Else
Me.pnlToolBar.Dock = DockStyle.Top
End If
End Sub
So,I want only one drag drop docking will happen.
Can you please suggest me solution for that?
Hello,
Based on the description of your scenario it seem that you have put UltraToolbarsManager in a panel in order to dock it at the top or bottom of your form. Instead you could directly dock toolbars o the top, left, right or bottom of the Container that the UltraToolbarsManager has been assigned to. When docked, toolbars sit inside of a DockArea on the Container. Toolbars can be moved within a dock area or between dock areas via drag and drop. Also you could specify to which side particular ToolBar could be docked, by managing Setting object of the Toolbar instance:
http://help.infragistics.com/Help/Doc/WinForms/2014.1/CLR4.0/html/Infragistics4.Win.UltraWinToolbars.v14.1~Infragistics.Win.UltraWinToolbars.UltraToolbar~Settings.html
http://help.infragistics.com/Help/Doc/WinForms/2014.1/CLR4.0/html/Infragistics4.Win.UltraWinToolbars.v14.1~Infragistics.Win.UltraWinToolbars.ToolbarSettings~AllowDockBottom.html
Also I recommend you to review the our “WinToolbars Basic Features” sample from our sample browser, if you have installed our samples you could find the Sample Browser under
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Infragistics\2014.1\Windows Forms\Samples
Please let me know if you have any further questions, or if I am missing something.
I want event related Docking at top and bottom.
Using that event we can drag drop toolbar.
Please suggest some event related that.
Hello ,
In order to determine when and where UltraToolabr was docked, you could use PropertyChanged event, you should use code like the following there:
private void ultraToolbarsManager1_PropertyChanged(object sender, Infragistics.Win.PropertyChangedEventArgs e)
{
object source = null;
if (FindAction(e.ChangeInfo, Infragistics.Win.UltraWinToolbars.PropertyIds.DockedPosition, ref source))
UltraToolbar toolbar = (UltraToolbar)source;
Debug.WriteLine ("Toolbar: {0}, DockedPosition: {1}", toolbar.Key, toolbar.DockedPosition );
}
private bool FindAction(Infragistics.Shared.PropChangeInfo propChangeInfo, Infragistics.Win.UltraWinToolbars.PropertyIds p, ref object source)
if (propChangeInfo == null)
return false;
if ((Infragistics.Win.UltraWinToolbars.PropertyIds)propChangeInfo.PropId == p)
source = propChangeInfo.Source;
return true;
else
return FindAction(propChangeInfo.Trigger, p, ref source );
Please let me know if you have any further questions.
I am just checking about the progress of this issue. Let me know If you need my further assistance on this matter?
Thank you for using Infragistics Components.