Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 37 additions & 2 deletions RdlDesign/DesignXmlDraw.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class DesignXmlDraw: UserControl
readonly Color OUTWORKAREACOLOR = Color.Azure; //out work area background color (on page, but in margin)
readonly Color OUTITEMCOLOR = Color.Salmon; //color of out work area parts of item

const float RADIUS = 2.5f;
const float RADIUS = 4.0f; // Increased from 2.5f for easier manipulation
readonly Color BANDCOLOR = Color.LightGray;
const int BANDHEIGHT = 12; // height of band (e.g. body, pageheader, pagefooter) in pts
const float LEFTGAP = 0f; // keep a gap on the left size of the screen
Expand Down Expand Up @@ -1131,7 +1131,8 @@ private async Task<float> DrawReportPrimaryRegions(XmlNode xNode, float xLoc, fl
// adjust coordinates for scrolling
TempRect.X -= _hScroll - 1;
TempRect.Y -= _vScroll - 1;
ControlPaint.DrawGrid(g, Rectangle.Round(TempRect), SizeGridPt, Color.White);
// Use dot grid instead of line grid for better visibility
DrawDotGrid(TempRect, SizeGridPt, Color.DarkGray);
}


Expand Down Expand Up @@ -1227,6 +1228,8 @@ private async Task DrawReportItems(XmlNode xNode, RectangleF r)
{
if (this._SelectedReportItems.IndexOf(xNodeLoop) >= 0)
DrawSelected(xNodeLoop, rir);
else if (this.ShowReportItemOutline)
DrawUnselectedOutline(xNodeLoop, rir);
}
}
}
Expand Down Expand Up @@ -1989,6 +1992,19 @@ private void DrawSelected(XmlNode xNode, RectangleF r)

}

private void DrawUnselectedOutline(XmlNode xNode, RectangleF r)
{
// Draw a subtle outline for unselected items to make them visible
if (xNode.Name == "Line")
return; // Lines already have their own rendering

StyleInfo si = new StyleInfo();
si.BStyleBottom = si.BStyleLeft = si.BStyleTop = si.BStyleRight = BorderStyleEnum.Dotted;
si.BWidthBottom = si.BWidthLeft = si.BWidthRight = si.BWidthTop = 1;
si.BColorBottom = si.BColorLeft = si.BColorRight = si.BColorTop = Color.LightGray;
DrawBorder(si, r);
}

private void HighLightTableRegion(XmlNode xNode,RectangleF r)
{
Color[] defaultTableGroupColors =
Expand Down Expand Up @@ -3135,6 +3151,25 @@ private void DrawCircle(Color c, BorderStyleEnum bs, float penWidth, float x, fl

}

private void DrawDotGrid(RectangleF rect, Size gridSize, Color dotColor)
{
// Draw a dot grid pattern within the specified rectangle
if (gridSize.Width <= 0 || gridSize.Height <= 0)
return;

using (SolidBrush brush = new SolidBrush(dotColor))
{
float dotSize = 1.5f;
for (float x = rect.X; x < rect.X + rect.Width; x += gridSize.Width)
{
for (float y = rect.Y; y < rect.Y + rect.Height; y += gridSize.Height)
{
g.FillEllipse(brush, x - dotSize / 2, y - dotSize / 2, dotSize, dotSize);
}
}
}
}

private void DrawLine(Color c, BorderStyleEnum bs, float w,
float x, float y, float x2, float y2)
{
Expand Down
5 changes: 4 additions & 1 deletion RdlDesign/RdlDesigner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public partial class RdlDesigner : IMessageFilter

private bool _ShowPreviewWaitDialog = true;
private bool _ShowEditLines = true;
private bool _ShowReportItemOutline = false;
private bool _ShowReportItemOutline = true; // Changed default to true for better visibility
private bool _ShowTabbedInterface = true;
private bool _ShowProperties = true;

Expand Down Expand Up @@ -176,6 +176,9 @@ private async void RdlDesigner_Load(object sender, EventArgs e)
KeyPreview = true;
await GetStartupStateAsync();

// Enable alignment grid by default for better visibility
AlignmentGridEnable.Checked = true;

// Initialize the recent file menu
RecentFilesMenu();
propertiesWindowsToolStripMenuItem.Checked = _ShowProperties;
Expand Down
Loading