The .Net "pack URIs" feature seems ideally suited to my C#
application, but I cannot make it work. I hope someone can help.
I have some images (GIF and JPG), which I have built into my library's
DLL, by setting Build Action to Embedded Resource. Using
Assembly.GetMan ifestResourceNa mes(), I have verified that they're
there, at run-time.
I have a string containing some generated XML text, representing a
XAML FlowDocument. Within the FlowDocument, there are some <Image>
elements, with Source attributes. These attributes need to point to
the images that I embedded in the DLL.
It seems to me that it should be easy to use pack URIs to do this. I
have verified that Assembly.GetExe cutingAssembly( ) gives the assembly
that contains the images, so I should be able to use either a simple
relative URI (e.g. "/mySubdir/myImage.gif") or a not-too-hard absolute
URI (e.g. "pack://application:,,,/mySubdir/myImage.gif").
If I try either of the above, my program crashes with Access
Violation. As it's a C# managed application, that shouldn't be
possible, should it?
If I try explicitly asking for my particular assembly (e.g. "pack://
application:,,,/MyAssembly;comp onent/mySubdir/myImage.gif"), it
doesn't crash, but it doesn't load the image either. When the
FlowDocument is rendered, there's a blank space where the image should
be.
The problem is definitely to do with the pack URIs, as I can get a
FlowDocument with images, simply by using "file:" URIs. That type of
URI isn't any good for the production system, though, because it ties
the FlowDocument to some arbitrary file location on my PC. 1 2622
On Wed, 16 Apr 2008 03:32:08 -0700, P Chase
<pe*********@gl obalgraphics.co mwrote:
[...]
Please do not multi-post. Learn to cross-post correctly so that your post
and any replies need only be read once, and are visible in each newsgroup
to which you've cross-posted. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Buck Turgidson |
last post by:
I am trying to learn PHP. I am confused as to why I need
$_SERVER in the first block, but just $PHP_SELF in the 2nd. I
don't see the latter assigned anywhere in the code.
Thanks for any clarifications.
elseif ($delete) {
|
by: Josh |
last post by:
Caution, newbie approaching...
I'm trying to come up with a very simple Tkinter test application that
consists of a window with a drop-down menu bar at the top and a grid
of colored rectangles filling the remainder of the window. Mind you,
this is a contrived test application to help me understand Tkinter and
Python, not an actual application yet. I've trivially subclassed
Tkinter.Canvas into ColorCanvas, added a bunch of ColorCanvases...
|
by: Stacy Mader |
last post by:
Greetings all,
I have a VMS binary file with weather data. The record
on each line is 1xint(8) 12xint(2)
Using the perl unpack function, I can decode the
binary file like this:
<snip>
|
by: Wiktor Zychla |
last post by:
I've downloaded the polish language pack for .Net Framework 1.1 and I've
installed it. Now I expect to see any exception messages in my native
language but I still get english texts in exception messages.
I think that I should somehow tell my application that it should use the
installed language pack but I have no idea on how to do it (I've read that I
could install more than one language pack so there should be a method to
'activate'...
|
by: jayderk |
last post by:
a customer was trying to install some of our software after they installed
the windows XP service pack 2 and he is getting a message that says
something about it not being compatable with windows XP?
we have our software on thousands of XP boxes and have not had a problem up
to this point. Any Clues/suggestions on what it could be?
Regards,
Jay
| |
by: H J van Rooyen |
last post by:
Hi,
I am struggling to get the pack method to do what I intend.
I am trying to display user input in a seperate window, along with
a little description of the field, something like this:
Current entry
Company : entered co. name
First entry : entered stuff
The second entry: more entered stuff
|
by: steene5 |
last post by:
I have a Dell computer with Microsoft windows XP home edition. I downloaded
Service pack 2 a year ago and my whole computer crashed. It took me a full
day to redo my whole computer while I was on the phone with Dell. I also had
downloaded the 2006 version of Norton antivirus before I downloaded the
service pack 2. I keep getting updates to download the service pack 2. I
have no support anymore for service pack 1. What do I do to...
|
by: Simon Forman |
last post by:
Hi all,
I realize this is more of a Tk question than a python one, but since
I'm using python and don't know Tcl/Tk I figured I'd ask here first
before bugging the Tcl folks.
I am having a terrible time trying to get a pack() layout working.
I have three frames stacked top to bottom and stretching across the
master window from edge to edge.
|
by: Eric Lindsay |
last post by:
I encounter an annoying number of ampersands in URIs I copy and paste
into blog style diary entries, written in HTML with a text editor. Does
anyone happen to know of reasonably reliable method of detecting and
fixing these? At present I mostly don't notice ampersands until I get
around to validating my pages. I don't validate nearly as often as I add
invalid URIs.
At the moment I have no idea of how to automate a fix. Google didn't...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |