473,322 Members | 1,405 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

System.Windows.Markup.XamlParseException

17
I keep getting this exception when i run the program. It is driving me insane. Does anyone know whats wrong and how do i fix this!

System.Windows.Markup.XamlParseException was unhandled
Message: Cannot create instance of 'Page1' defined in assembly 'ArcForex.com, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Exception has been thrown by the target of an invocation. Error in markup file 'Page1.xaml' Line 1 Position 7.


Page1.xaml

Expand|Select|Wrap|Line Numbers
  1. <Page x:Class="Example.com.Page1"
  2.     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3.     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4.     Title="Page1" Height="192" Width="999">
  5.     <Grid Background="Azure">
  6.         <Image Source="C:\banner.jpg"  Margin="17,0" Name="image1" Stretch="Fill" Height="84" VerticalAlignment="Top" />
  7.     </Grid>
  8. </Page>
  9.  
Page1.xaml.cs

Expand|Select|Wrap|Line Numbers
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Windows;
  6. using System.Windows.Controls;
  7. using System.Windows.Data;
  8. using System.Windows.Documents;
  9. using System.Windows.Input;
  10. using System.Windows.Media;
  11. using System.Windows.Media.Imaging;
  12. using System.Windows.Navigation;
  13. using System.Windows.Shapes;
  14.  
  15. namespace Example.com
  16. {
  17.     /// <summary>
  18.     /// Interaction logic for Page1.xaml
  19.     /// </summary>
  20.     public partial class Page1 : Page
  21.     {
  22.         public Page1()
  23.         {
  24.  
  25.                 InitializeComponent();
  26.  
  27.         }
  28.     }
  29. }


Thanks
Oct 3 '08 #1
8 15892
Bubbs
17
Btw, Im making a silverlight page called Example.com
Oct 3 '08 #2
Plater
7,872 Expert 4TB
Is this:
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Point to a valid dtd schema for "x" ?
Oct 6 '08 #3
Curtis Rutland
3,256 Expert 2GB
That is a standard schema used in Silverlight....that isn't the problem.

Unfortunately, I can't see what the problem is...
Oct 6 '08 #4
Plater
7,872 Expert 4TB
Would it care about being Example.Com.Page1 in assembly 'ArcForex.com' ?
Oct 6 '08 #5
Curtis Rutland
3,256 Expert 2GB
OK, I know this is weird, but give it a try...(because I googled your error message and found something like this)

Maybe it doesn't like an absolute path to the image....try adding the image to the project, and giving it a web-style path relative to the project.

So if you made a folder in the project called images, the path would be
images/filename.jpg

Try that and see what happens.
Oct 6 '08 #6
Plater
7,872 Expert 4TB
That would actually make a lot of sense, frequently you would not be allowed out of the web application's "root", particularly for html elements(Same would apply for xml elements used?)
Oct 7 '08 #7
Curtis Rutland
3,256 Expert 2GB
Yeah, since this will be deployed via the web, you wouldn't be able to access local resources anyway...so that might be the problem right there.
Oct 7 '08 #8
Bubbs
17
thanks guys. Got it working.
Oct 14 '08 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Jacek Generowicz | last post by:
:::Title::: A simple text markup utility :::/Title::: :::Section Introduction ::: I'm looking for something to help developers wirte documentation for bits of software they are writing. The...
30
by: Reinhold Birkenfeld | last post by:
Hello, I know that there are different YAML engines for Python out there (Syck, PyYaml, more?). Which one do you use, and why? For those of you who don't know what YAML is: visit...
0
by: MarionEll | last post by:
Montreal in August: what could be better? Great food, great coffee, and a funky hotel full of markup geeks! CALL FOR PARTICIPATION EXTREME MARKUP LANGUAGES 2004 ABOUT THE CONFERENCE ...
0
by: MarionEll | last post by:
--------------------------------------------------------- ************* Complete Program Available ************** ************ Late Breaking Sessions Added ************* *********** Extreme...
38
by: Jukka K. Korpela | last post by:
As well all know, valid markup is important... but when trying to find a convincing modern argument in favor of this, I found pages like http://www.htmlhelp.com/tools/validator/reasons.html which...
47
by: Andy Dingley | last post by:
Assume an English language page, linking to a foreign history resource that's only available in a foreign language. Any suggestions on appropriate "best practice" markup, particularly regarding the...
4
by: Baron Samedi | last post by:
hi, I followed the instructions at http://validator.w3.org/docs/install_win.html ("Installing the W3C-Validator on a Apache under Windows") and it works perfectly. I can locally validate HTML...
1
by: Hoffmania | last post by:
I must be missing somthing .... The new form designer in VS 2005 allows for drag and drop of compnents from the data sources tab. With this functionality one can almost 'magicly' create standard...
1
by: Juan R. | last post by:
The initial CanonMath program presented here http://canonicalscience.blogspot.com/2006/02/choosing-notationsyntax-for-canonmath.html] was discussed with several specialists, including father of...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.