Similar Threads:
1.#region Suggestion
The #region keyword would be more helpful if it stood out more in the IDE
code window, making it easier to find each section with a quick glance. The
#region is helpful at design time, and could be better utilized.
My suggestion is to have another IDE option to set the font size and color
for #region. By default, possibly change it to stand out more.
2.Suggestions for standard regions
Just starting on C# and would like to know what suggestions
there are for the order in which declarations, event
handlers, properties, private code, nested classes, etc,
etc appear in your files. What impact do access modifiers
have on the order? Also, does anyone use standardised
region names?
3.#Region #End Region issue
When working in the Code-behind of ASP.net using VS2005, if you create a
#Region "SomeName" #End Region, and close VS2005 then reopen it all your
#Region #End Region collapses.
Is there a setting in VS2005 that prevents this from happening, because this
makes it difficult to work on projects that you want to come back to later
and what to leave a #Region expanded so you know where you left of or know
what you were working on before?
Thanks,
4.Invalidating a region and having only that region drawn
Hello,
In my application I perform all the drawing operations from within the form's
OnPaint method (the form is ultimately a TabPage derivative) ie
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
//the base class LayerView.OnPaint handles things like AutoScrollPosition
int s = 1; // temporary dummy scale value
m_building.DrawBuildingLayer(g,s,this.Name);
m_columns.DrawColumnsLayer(g,s,this.Name);
}
The drawing works well and smoothly handles operations such as scrolling.
It is my understanding that when Invalidate() is called ie with no
parameters, the entire client area of the form is added to the update region
and a paint message is sent that raises the Paint event which is handled by
the OnPaint handler. OK
When Invalidate(region) is called, I believe that only that region is added
to the form's update region resulting in only that region being redrawn at
the next Paint message.
Either way, calling Invalidate results in OnPaint to be executed.
When I call Invalidate() the entire client area is redrawn with both drawing
functions called and this is exactly the outcome that I want for that
scenario.
The problem is that when I only want to redraw a invalidated region of this
form,
the entire form is redrawn( which is causing objects to be appear
incorrectly).
ie When I call Invalidate(with a specific region) in order to only have that
region redrawn I do NOT intend for the likes of DrawBuildingLayer nor
DrawColumnsLayer
to be called. Obviously they are being called because of their presence in
OnPaint().
I cannot think of any other place where I could call these draw functions
other than OnPaint and I want to steer clear of CreateGraphics.
Are there any suggestions regarding a strategy of how I could call
Invalidate(region) and only have that region redrawn ?
Thanks
Andrew.
5.Constructing a clip region from points inside the region
I have all points that are inside a region
But they are a lots of points there... how to convert them to a region as
GraphicsPath that can be shrinked to a graphicsPath points and types..I need
the smallest string that reflect the region
--
Cheers,
Crirus
------------------------------
If work were a good thing, the boss would take it all from you
------------------------------
6. Creating a GraphicsPath from a Region by hit-testing with Region.IsVisible()
7. Examples using Region and/or Region.Intersect?
8. Region visible in another Region?