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

Post New Web Links

TouchPoint size

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


I try to get the size of a TouchPoint  from TouchUp/-Move/-Down handlers, Touch.FrameReported handler or Manipulationevent handlers in WPF 4. The Size property of the TouchPoints is always (0,0). The TouchDevice in the events is a StylusTouchDevice

My touchscreen reports the size of the points and when I hook up directly to the WM_TOUCH messages in my WPF window, I can read out the size. So I think from the device's HID driver, everything should be ok.

There seems to be a problem, that WPF does not regognize or accept the size values from the raw touch messages, but i can't figure out why... The TOUCHINPUTMASKF_CONTACTAREA flag (which sould point out, that contactarea size is set and valid in the touch message) seems also to be set correctly. Also tried different setting in windows controlpanel for stylus- and fingerinput.

Does anybody have a hint what can be wrong or some experience in getting the the Touchpoint size from WPF Touch/Manipulation events?

Thanks for any advice,


View Complete Post

More Related Resource Links

Reduce ASP.NET Page size and complexity using JQuery

This is my first post on asp.net blog. ASP.NET Ajax and JQuery are two different ajax framework. In this post I will show, how we can enhance gridview using ASP.NET Ajax and JQuery. I also compare the implementation of these frameworks. In next posts i will explain more about JQuery and ASP.NET Ajax and also tell you "How to combine the power of both framework". My Future post will related to ASP.NET and related frameworks.

Set Custom Paper size in C#.net 3.5


Dear All,

I have to set custom paper size 6X8 inches

plz tell sugest me code how to do it.

in C#.net 3.5

i m using Asp.net 3.5 Crystal report

i have to do it programiticlly



Reduce Image Size


How to reduce the image weight using asp.net, without lose of image quality and image pixels. For example i have an image with the size of 4 MB (3024*2045), so how to reduce the image weight ie 4 MB to 1 MB without lose quality in the same pixels ie(3024 * 2045) using asp.net.

Detect Browser Screen Size??


Hi Everyone,  I need to detect the size of the user's screen for mobile devices (especially the BlackBerry). I've read a lot of pages that seem to refer me to the Request.Browser object, but I'm finding that this object doesn't have the correct values. For example, I have a BlackBerry and when I use the Request.Browser to get the screen size, it tells me it is 640x480. Well, I know it's not that big since an image of 300px wide just barely fits. Also, when I run on my desktop browser, it also says my screen is 640x480. I can assure you, it is not 640x480! ha!

  How does anyone reliably get the browser's screen size?? Do I have to revert to some kind of JavaScript? If so, where can I read more about it? Will it be any more reliable? Someone must have an idea about this. Thanks in advance!!

Obtain mobile device screen size



I am trying to get the screenHeight and width:


 // Get MobileCapabilities from current Request.Browser
        MobileCapabilities currentCapabilities = (MobileCapabilities)Request.Browser;
        // get a property of the  browser 
        Response.Write(currentCapabilities.ScreenPixelsHeight +  " <br>");
        Response.Write(currentCapabilities.ScreenPixelsWidth  + " <br>");


 but this is always show that the Height is 480 & the width is 640

I am trying on HTC with Opera Mobile 9.5

Any Advice?

AsyncFileUpload: Throw Error on image size


I have an AsyncFilUpload that is used to upload  to my site. On the server side I have code that checks the width and height of the image and will only save the image if it is within the limits buit I can't figure out how to get the AsyncFileUpload control to show an error when this happens. Can anyone give me any pointers?


Setting size of Grid Since Ajax Resizer Changed It


I'm sure that wasn't a very good subject, but I couldn't think of a better one. What I have is a page that has an UpdatePanel on it with a GridView control in it. It was originally displaying at a particular height and width according to the CSS style I have setup for it in my style sheet. However, since adding an AJAX Resizer control to the UpdatePanel, it is now defaulting to a much smaller size.

How do I get the grid to default to that same height and width that is in its CSS class? I don't mind putting it in the ASPX page or whatever, just need the grid to default to a larger size than the small little box it defaults to since adding the AJAX resizer. 

Size of jQuery datepicker popup


I have several mvc applications all using the jquery datepicker. One of them the popup appears double size (height and width), obvously it's something I've inadvertantly changed, probably in the css, but I can't figure out what it is. I have tried/applied a few themes and css/site master from the mvc code templates on codeplex, but I just can't figure out what did this one.

Any ideas ?

Owner-drawn ListView and nonstandard subitem size: selection problems.

Hello, I have a ListView whose first column is owner-drawn and items can be selected (I had to jump through hoops to draw the focus rectangle correctly). The problem is, my custom drawing displays the text in a wider font than normal, and only for this column. And when I click an item to select it, the right part of the text does not react, because the listview doesn't "know" there is text there (since it "thinks" the text is smaller). How can I correct this? Is there a "hit test" or "measure item" event or something, to tell the list view to consider a wider zone for clicks?

Get real image size in centimeters

Hi, Im new in c# , I have an image in picturebox and draw a line connecting within two coordinates points x1, y1 and x2, y2. I wonder if there is any way of calculating the size of the line in centimeters. If i can have an example i will thank. Thanks ..  ed

Split List into sub lists of List of size n

Hi all,   I've been playing around for a little bit trying to find the best way of taking a List<double> of variable size and splitting it in to sub-lists of  size n. So maybe a method stub like   public List<List<double>> splitData(int width,List<double> data) { <br/> }<br/> The problem is i cant get my head around how to iterate through the parameter "data" properly when the data.count is not exactly divisible by the parameter "width". I have been trying for loops but i think i need to switch to do whiles.   I'm not massively familiar with LINQ but could anyone advise if LINQ would provide an alternative way of doing it?   Any help much appreciated   John

how to create a Bitmap with size(20000,30000) in c#

hi how to create a BitMap with size (20000,30000) using C#

Logfile size wrong - SMO lies!!

I'm running SMO from Powershell against a SQL 2005 instance and generally issue the following query (with the results shown below): c:\> $ss = New-Object "Microsoft.SqlServer.Management.SMO.Server" "myhost\myinst" c:\> $ss.databases["tempdb"].logfiles[0].Size 65536 If log into that server with SQL Server Management Studio and click on Properties for tempdb, select files, the Size field is shown as 64 (M) However!! if I issue the query below in SSMS, I get a different result.  grr..... sp_helpdb tempdb name fileid filename filegroup size maxsize growth usage templog 2 T:\data_01\\templog.ldf NULL 331904 KB Unlimited 10% log only so what happens is at some point I try to issue something like: ALTER DATABASE [tempdb] MODIFY FILE(NAME='templog',SIZE=112875KB) Msg 5039, Level 16, State 1, Line 1 MODIFY FILE failed. Specified size is less than current size. which obviously fails since my measurement of file size was errorneous. this is really not good. thoughts anyone? p.s. incidentally, if I look at the actual file, its size is correctly stated by sp_helpdb, so SMO is wrong!!

XML size cost to a database

I am in the process of integrating a procedure that imports data into an xml format. The question I have what is the cost on disk versus just importing each colunm. Say I have 10 columns of data, how much more space does an xml column take than just 10 individual columns with the same data. I have searched everywhere and I can not find a definite answer that addresses this question. Any help is greaty appreciated.

Log file size question

I recently setup transaction log backups after we had a log file get near its capacity. I noticed after log files are truncated, they still use up the same amount of disk space. Is it safe to shrink a log file?  If so how do you determine what is an appropriate size to shrink it to? I ask this because some databases, like a sharepoint content database, have log files that are 130 GB in size when their data files are only 5 GB.  I assume that now that I am running hourly log backups they dont need logg files that huge. -Edit - Also most of the logg files are setup with the default settings
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