The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
We have an applicaton that uses an OverviewControl and we would like to float the control and position it in a specific location when it is first made visible by the user.
I looked at the SimpleCode sample and tried to something similar but it did not work for the OverviewControl. I modified the DiagramBuilder sample and had a similar problem. Here is the code that I changed in DiagramBuilder MainForm.cs
private void barItemPanZoom_Click(object sender, System.EventArgs e)
{
if(this.barItemPanZoom.Checked == true)
{
// Hide the overview control
this.dockingManager.SetDockVisibility(this.overviewControl1, false);
this.barItemPanZoom.Checked = false;
}
else
{
// Initialize the OverviewControl with the active diagram''s Model & View and display the control
if((this.ActiveDiagram != null) && (this.dockingManager.GetDockVisibility(this.overviewControl1) == false))
{
this.dockingManager.SetDockVisibility(this.overviewControl1, true);
// *** I added this call to FloatControl to position it at the top left of the main form.
this.dockingManager.FloatControl(this.overviewControl1,
new System.Drawing.Rectangle(this.Bounds.Left,this.Bounds.Top,300,300));
this.overviewControl1.Model = this.ActiveDiagram.Model;
this.overviewControl1.View = this.ActiveDiagram.View;
}
this.barItemPanZoom.Checked = true;
}
}
Can you please take a look and tell me what I''m doing wrong? We are currently using 4.1.0.50.
Thanks in advance for your help.
Chris
JKJoy K George Syncfusion Team June 19, 2006 08:56 PM UTC
Hi Chris,
I was able to reproduc the situation.You may overcome this behaviour by using the following method.
1.Open the application in Designer view.
2.The Overview control will in floating state.
3.Dock that control to any side.
4.Run the application.And click on the baritem to float the control
Please let me know,if this helped you.
Regards,
Joy
CCChris CJune 20, 2006 06:47 PM UTC
Thank you for the suggestion. However, we would like to float the control programmatically. I found that the FloatControl method works if the control is currently docked. However, I would like to move the control programmatically even if it already floating, and that is not working.
Thanks in advance for your help.
JKJoy K George Syncfusion Team June 20, 2006 07:47 PM UTC
Hi Chris,
You could move FloatingForms using the below method.
if(dockingManager1.IsFloating(overviewControl1)){
FloatingForm ff=overviewControl1.Parent.Parent as FloatingForm;//FloatingForm is a form derived control
ff.Location=new Point(this.Bounds.Left,this.Bounds.Top);
}
Please let me know, if this resolved your issue.
Regards,
Joy