.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Moving RectangleGeometries with mouse

Posted By:      Posted Date: October 12, 2010    Points: 0   Category :WPF

My application involves moving many rectangles around the screen using the mouse. There is one main rectangle which contains ~ 24 smaller rectangles.

 The mouse move event does the following:

mouseLocation = e.GetPosition((UIElement)sender);

The locations of the rectangles are updated:

rect.Location = DetermineLocation(); // Rect object
perimeter.Rect = rect; // RectangleGeometry
return perimeter;

I am adding all of the rectangle geometries (~ 25) to a path geometry and setting a path object's data property to said path geometry object.

When i move the entire group of rectangles around the screen, my CPU usage goes to over 70% (i have an Intel Atom N450 @ 1.67 Ghz). I am convinced that there is a much "lighter weight" way to do this in WPF. Someone please enlighten me.

View Complete Post

More Related Resource Links

How to highlight datagrid or GridView row on mouse over?

This article will show how you can Ajax with GridView to display popup messages when mouse moves over certain column. In the demo project I have added first column as an image column with a help icon in it. This kind of implements a feature that if you want more information about the row you can move mouse over this icon, a asynchronous request is sent to server for data about that row and when call returns the returned message is show as a popup message.

Netting C++: EEK!-Time to Design the Mouse


This month begins the design of the actual mouse class for EEK!

Stanley B. Lippman

MSDN Magazine December 2007

Cutting Edge: Moving DataGrid Rows Up and Down


Imagine opening your Inbox one morning and finding a message that reads "Dear Mr. DataGrid, I urgently need an ASP.NET DataGrid that lets my users move rows on the client. You're my last hope. Will you please help me?"

Dino Esposito

MSDN Magazine March 2005

Highlight gridview row on mouse hover in asp.net

The article Highlight gridview row on mouse hover in asp.net was added by uniquesaiful on Sunday, June 06, 2010.

Gridview control is a customizable and flexible control used to display data in tabular format. It has some nice features. But lacks of some client side features that makes web users happy. We can easily add these features with few lines of code. For

Buttons with Mouse-Over Behaviors - Redux

I recently posted some CSS and HTML snippets for a buttons collection I was using for a Menu style UI Scott Koon from www.LazyCoder.com posted a comment with a better way (thanks Scott). This way I don't have to set the CSS Class for each button. Just contain them in a div. Here is the [...] Read More......(read more)

Do not see the table in Database after moving the project folder



I created a ASP.NET project under Visual Web Developer 2008. Under that project I had a Database (along with ASPNETDB.MDF) which has about 3/4 tables (I had SQL server 2008). Everything was working fine (like insert, delete, etc.). And I was able to view the tables in database explorer view.

Then I had to format my computer for some reason and I copied the whole project in a USB drive and then after formatting the computer I copied the folder and tried to open it in Visual Web Developer (now I have VWD 2010). I can see the both Database under App_Data folder (ASPNETDB.mdf and the DB I created). ASPNETDB has all the tables and data as expected. But I do not see the tables under the DB I created.

I also tried in one of my friends computer who has Visual Web Developer 2008. But same result.

I am just wondering if anyone can help me with retreiving the table. I have a bad feeling that I might needed to do something to backup the data (not sure though). But the tables should be still there ... isn't it ?

Any help will be appreciated. Thank you in advance.

Moving a website - URL aliasing question


Hi we are migrating a website from a proprietary system  to a new system built inSQL 2008.

The old  system has about 6,000 pieces of content with individual hard-coded aliases. How could we go about creating a match table to ensure these resolve with our new system (based on Intellgentsia URL rewriter)?

Any pointers would be helpful.

Problems moving an InfoPath form from a DEV system to QA environment


We developed an InfoPath form using a local DEV environment.  The site collection under which the form was developed was http://server1/.

We are now attempting to deploy this form to a TEST environment that uses a slightly different structure for the collection, namely http://server2/sites/sitecol1.

In both cases the site that contains the form is /fin (so we were using http://server1/fin in DEV and want to use http://server2/sites/sitecol1/fin in TEST). 

The form contains VBA code and so requires admin-based deployment via Central Administration, so to deploy to TEST we:

1. Publish the form against the TEST server using InfoPath Designer

2. Upload the form using Central Administration > Application Managment > Manage Form Templates

3. After upload, we activate the form for the site collection http://server2/sites/sitecol1/

4. The form is then associated with a Form Library

When we try to create an instance of the form within this library we get the following error when we click on New to create the form instance:

The following location is not accessible, because it is in a differ

How to capture ReportViewer Mouse Events


I have a ReportViewer which I'm pulling into a C# WPF project, and would like to be able to capture the row a user clicks on in the reportViewer, but have had no success tapping into the mouse event handlers.   Does anyone know how to accomplish this?  

This MSDN link seems to imply that ReportViewer(winforms) supports mouse click events such as Click, DoubleClick..etc.  http://msdn.microsoft.com/en-us/library/microsoft.reporting.winforms.reportviewer_events.aspx, but I've not had any luck.

If mouse events are not currently supported, does anyone know when they will be, and whether properties such as SelectedItem or SelectedIndex would also be exposed?

Thanks for the help.

WSS 3.0 - problem with moving the database


My company wants to move a database included with WSS 3.0 installation to a *separate* server.
We want to have the database completely separated, on a different computer, on SQL Server 2005 installation.

Unfortunately, I'm not sure If the sharepoint is configured as a "Web Front End" or  "Stand-alone".
All I know, everything currently is on the same computer, and we can connect to the live database using the following path: \\.\pipe\MSSQL$MICROSOFT##SSEE\sql\query

The question is, how can we move the database to SQL Server 2005, on very different server, leaving the application untouched?

Quick summary, we currently have:

--- Server A: (WSS 3.0) + [windows internal database / SSEE (not sure!)] + DOMAIN X

and we want t

Moving to Vs2010


hello all!,

I'm trying move a class library project to VS2010 and I got problems with one  reference to this project. For some reason the reference look fine in the solution explorer but in the Object Explorer I can't to see the referenced assembly :(. I tried rebuild the solution but nothing :(

The message what I got in the code is:

"Namespace or type specified in the Imports 'MyCompany.common.services.Utilities' doesn't contain any public member or cannot be found."

Any help! :(

Moving SharePoint 2007 from Domain to a Workgroup


For development purposes, we have SharePoint 2007 installed on a virtual server (Wind 2003) on a company desktop (Vista Business ed.).  The SharePoint is using Active Directory and company domain. For learning purposes, we want to copy the virtual machine on another Vista machine that is outside the domain and is not using AD:

Question 1 : How can we move the SharePoint from a domain to a Workgroup
Question 2: Is it possible to still be able to use emails (through local installation of Outlook) on the same computer that is not on the domain? If, yes, what are the possibilities (any articles on it? Etc.)?


Moving Datarow from datagridview to textboxes

Hi , I need to know how to copy a datarow from datagridview to subsequent textboxes.I have three textboxes and three fields in datagridview .
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend