You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometime back I implemented Line. It is extremely simple right now:
/// <summary>/// Draws a single line using the <see cref="LineStyle"/> specified by <see cref="View.BorderStyle"/>./// </summary>publicclassLine:View{privateOrientation_orientation;/// <summary>/// The direction of the line. If you change this you will need to manually update the Width/Height/// of the control to cover a relevant area based on the new direction./// </summary>publicOrientationOrientation{get=>_orientation;set=>_orientation=value;}/// <summary>/// Constructs a Line object./// </summary>publicLine(){}/// <inheritdoc/>publicoverrideboolOnDrawFrames(){varscreenBounds=BoundsToScreen(Bounds);LineCanvaslc;lc=SuperView?.LineCanvas;lc.AddLine(screenBounds.Location,Orientation==Orientation.Horizontal?Frame.Width:Frame.Height,Orientation,BorderStyle);returntrue;}//public override void OnDrawContentComplete (Rect contentArea)//{// var screenBounds = ViewToScreen (Frame);//}/// <inheritdoc/>publicoverridevoidOnDrawContent(RectcontentArea){OnDrawFrames();}}
Note the comments in the code are wrong and it's buggy (assumes Bounds == Frame).
My dream is that it gets enhanced to take the code that's in TileView for dragging an edge with keyboard/mouse (showing a diamond) so that I can be used as the basis for any "view edge drag operation".
If we do this, and then use Line objects for the top, right, bottom, and left of a view's Border frame, all mouse/keyboard dragging logic for View resizing (see #2537) will be nicely encapsulated.
TileView then can be removed and replaced with a tiled-layout mode. See #2491.
The text was updated successfully, but these errors were encountered:
This is a sub-issue of:
Todo
Line
class.LineView
has, soLine
can replace it.Line
(ifCanFocus == true
).Line Demo
scenario.Line
withinBorder
to support Add mouse/keyboard resizing of views #2537LineView
LineViewExample
scenarioTileView
; use a tiled-layout mode instead. See Get rid ofToplevel
- IntroduceRunnable
andOverlapped
instead #2491.Background
Sometime back I implemented
Line
. It is extremely simple right now:Note the comments in the code are wrong and it's buggy (assumes Bounds == Frame).
My dream is that it gets enhanced to take the code that's in
TileView
for dragging an edge with keyboard/mouse (showing a diamond) so that I can be used as the basis for any "view edge drag operation".If we do this, and then use
Line
objects for the top, right, bottom, and left of a view's Border frame, all mouse/keyboard dragging logic for View resizing (see #2537) will be nicely encapsulated.TileView then can be removed and replaced with a tiled-layout mode. See #2491.
The text was updated successfully, but these errors were encountered: