Line control with diagonal orientation

0
0

WiseJ Line control only supports two orientation right now- vertical and horizontal. How can we create lines with diagonal orientation.

 

  • You must to post comments
0
0

We actually have 4 ways to draw lines:

  1. Line control.
  2. Shape control.
  3. Paint event
  4. Canvas control

 

1 and 2 are div elements with borders that can be rotated.

3 can be painted on any Wisej control. All Wisej controls support the Paint event and can draw an image in the background.

4 is a full HTML5 Canvas element wired to the server. You can use all the canvas instructions in C# or VB.NET! https://www.w3schools.com/html/html5_canvas.asp

See attached small demo and sample code below:

 

 private void label1_Paint(object sender, PaintEventArgs e)
 {
   e.Graphics.DrawLine(Pens.Gray, 0, 0, 100, 100);
 }

 private void canvas1_Redraw(object sender, EventArgs e)
 {
   this.canvas1.MoveTo(0, 0);
   this.canvas1.LineTo(100, 100);
   this.canvas1.StrokeStyle = "gray";
   this.canvas1.LineWidth = 1;
   this.canvas1.Stroke();
 }
  • You must to post comments
0
0

But can we draw Line control within a Shape control. Could not find anything in the Shape class.

We are trying to migrate from Visualwebgui to Wisej. So on the winform application we have a line control with diagonal orientation and trying to render it onto Wisej.

  • You must to post comments
0
0

Hi
Another option you can use, is the shape control
With it, you can play with BorderStyle* and Rotation properties

Please, see the atached image

We hope to will help you

Regards and happy coding

 

Attachment
  • You must to post comments
0
0

Hi thanks for write us

The feature that you ask, can do it with the extender control “Rotation”
This wisej control add extend capabilities to rotate to any control that you have in a container.

I adjunt an example image

Regards

 

Attachment
  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.