.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

Weird Exception: Method not found: 'Double System.Windows.Controls.ScrollViewer.get_ContentHorizon

Posted By:      Posted Date: September 15, 2010    Points: 0   Category :WPF
Hi guys I have an XBAP application that uses a Xamdatagrid from Infragistics. I have some filtering on this grid, that rebinds after a filter. The problem is, when a user has scrolled to a certain point and then filters, the rebinding causes the grid to scroll to the beginning position of the grid. Now how I solve this is by getting an instance of the ScrollViewer, I get the ScrollViewer.ContentHorizontalOffset and then I do a ScrollViewer.ScrollToHorizontalOffset after it filters.   Now here comes the problem. For 99% of the users of this xbap app, this will work absolutely fine. Most, if not all of the users run exactly the same machines, XP 64 bit with 8GB RAM. The other 1% get the error: Method not found: 'Double System.Windows.Controls.ScrollViewer.get_ContentHorizontalOffset()'. I cannot reproduce this error on my own box, our dev server or our production server, it is a phantom exception that only pops up on a certain condition. I have even wrapped the "offending" code in a try catch and it still doesn't solve it. If I set the DispatcherUnhandledExceptionArgs Handled to true, it works, but it doesn't feel right. How is this possible? If the method doesn't exist, how can it compile? Why does that method exist for 99% of the other users running the exact same machines? I have googled my fingers raw without any valid results and this issue is frustrat

View Complete Post

More Related Resource Links

Cash Drawer - Method Open threw an exception - Windows Service

Hi All, I'm getting the following exception while calling Open method of Cash Drawer object. Method Open threw an exception.  Could not read the device name key's default value, or could not convert the Programmatic ID it holds into a valid Class ID. Code:   class Class1 { CashDrawer _uniCashDrawer1 = null; DeviceInfo cashDrawerDevice1 = null; PosExplorer posExplorer = new Microsoft.PointOfService.PosExplorer();   public void ClaimCashDrawer() { cashDrawerDevice1 = posExplorer.GetDevice("CashDrawer", "testDrawer"); if (cashDrawerDevice1 != null) { _uniCashDrawer1 = posExplorer.CreateInstance(cashDrawerDevice1) as CashDrawer; if (_uniCashDrawer1 != null) { _uniCashDrawer1.StatusUpdateEvent += new StatusUpdateEventHandler(UniCashDrawer1_StatusUpdateEvent); _uniCashDrawer1.Open(); _uniCashDrawer1.Claim(0); _uniCashDrawer1.DeviceEnabled = true; } } } }   Tha above code works fine if you put the code in WindowsApplication in all POS systems. The same is working if you put the code in Windows Service in all other POS systems. The same is not working if you put the code in Windows Service in Aures Galeo POS systems.  Thanks in advance. Ramakrishnan S

'System OutOfMemory Exception' while using rdlc in Windows application

hi Everyone , I am Using Reporting Service (.rdlc) in my Windows application , i am getting Error System OutOfMemory Exception Like "an error occured during local report processing An Unexpected error occured in Report Processing Exception of type 'System OutOfMemory Exception'Was Thrown " what to do Please anyone help me ... Advance Thanks Anilmarnal

A first chance exception of type 'System.ArgumentException' occurred in System.Windows.Forms.dll

I've read a bit about this error and maybe I have nothing to worry about.  BUT ... my simple little app gets 7 of these before it even gets to the first Dim statement in the Class Form1!  I found and followed instructions on how to have the Debugger intercept these exceptions but it seems that they are not being intercepted.  I only know that they have happened because of the messages in the Immediate Window.  In the Designer all I have is 5 Labels and 5 TextBoxes.   Any thoughts on how I could get to the cause of these messages? Thanks,  Bob

Problem with overriding OnPaint method of System.Windows.Forms.Textbox

Hi,   I want to change the border colour of the Textbox. However, when I override the OnPaint method, some strange behaviour occurs.   The new border is drawn, as is the textbox background. However, the text itself appears in bold and only while I actually type something in, afterwards it disappears. I have provided a sample of my code here:         protected override void OnPaint(PaintEventArgs e)         {             base.OnPaint(e);             Rectangle rect = new Rectangle(0, 0, this.Width, this.Height);             ControlPaint.DrawBorder(e.Graphics, rect, _BorderColour, ButtonBorderStyle.Solid);         }   I have also set the style of the control to Userpaint, so that the paint method is actually used. Does anybody know how to solve this issue?

SpellCheck (System.Windows.Controls) support for other Languages

Hi, I have a question about SpellCheck class. I use .NET 4.0 and I know that 4 languages are supported. I need to write an easy editor with spell check functionality. It will need to support Dutch language. Depending on when Dutch Language will be supported, the current project will go in different directions. Could you provide me any information about when it is going to happen (if it is going to happen)? With kind regards, Michal Bilinski, Meteo Consult, the Netherlands.

What do I need to use references System.Windows.Controls.DataVisualization.Toolkit, WPFToolkit, Exce

Hi. My friend gave me a WPF application source code made with Visual Studio C# Express 2008. So I downloaded and installed Visual Studio C# 2008 and opened the project. But it will not compaile because some references have warning icons on them, the ones I stated in title. So what am I missing? I have 32 bit Windows 7, I have .NET framework 3.5 and Office 2007.

How to Set System.Windows.Controls.WebBrowser.Document Property , navigatetostring,stream DONT WORK


Hi , i search in google , bing , cuil and all of searchs provider for the solution of this problem :


I get HTML content from HTTPWebRequest(because is much requests and if i use WebBrowser control directly i get a lag and video processing unnecessary)


And i need  set System.Windows.Controls.WebBrowser.Document with this text.


"Solution" , use new methods call NavigateToString() or NavigateToStream()

BUT THIS PROBLEM , both DON'T work with <javascript src="something.js"> or <style src="something.css">

Navigates ONLY read and process content INSIDE this tags , no external files (like 'something.js')

Solution i encountred after two weeks of search

Process the text and replace the files by the content of that.

But this i think that is no real solution. (i tested , work , but not perfectly) * I write my own code because that post dont have source code.

for why you need to do that?

because i need interact with users after search , and use html's input to re-search again and process this file with all extern files is too slow

Any solutions?

C# Lenguage

Sorry for bad english, i'am brazilian.


Weird Exception C015000F in 32bit MFC app on 64 bit windows 7 with SQLCE 3.5 SP2

Exception code: C015000F The activation context being deactivated is not the
most recently activated one.
Fault address: 776F4391 01:00074391 C:\Windows\SysWOW64\ntdll.dll
One of my customers is getting the following error apparently when trying to
update an SQLCE 3.5 SP2 database.
It appears that the correct 32 and 64 bit versions of Sp2 are installed on
his machine.
Unfortunately, on the 64 bit w7 machine I have, the error doesn't occur.
I've tracked this down to possibly being related to this hotfix:
described more fully here:
http://blog.paulbetts.org/index.php/2010/07/20/the-case-of-the-disappearing-onload-exception-user-mode-callback-exceptions-in-x64/Has anyone else run across this. Any obvious reasons SQLCE might throw anexception on one machine but not another? I have a copy of the databasethat was being accessed, but it appears fine.--Anthony WieserWieser Software Ltd

Anthony Wieser | Wieser Software Ltd | www.wieser-software.com

System.Windows.Documents Namespace not found


I'm using ASP.NET4.0, and getting the following compilation error:

CS0234: The type or namespace name 'Documents' does not exist in the namespace 'System.Windows' (are you missing an assembly reference?)

Source Error:

Line 20: using System.Web.UI.HtmlControls;
Line 21: using System.Security.Principal;
Line 22: using System.Windows.Documents;
Line 23: 
Line 24: /// <summary> ///

Source File: c:\Documents and Settings\stilwell\Desktop\DEV40-1\App_Code\LoadForm.cs    Line: 2

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