Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7494625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T17:40:48+00:00 2026-05-29T17:40:48+00:00

I have tried every way I can find to make my custom control understand

  • 0

I have tried every way I can find to make my custom control understand URI packs – both in generic.xaml and code. All examples I find works fine in my user controls, but never in custom controls.

All files are set to Resource – except for generic.xaml, if I change that the custom control stops displaying all together.

If I try any kind of pack URI I get errors at compile time. Relative or absolute, doesn’t matter. I’ve tried putting the images in other assemblies as well, but with no luck.

If I try New Uri("/Images/btnImage.PNG", UriKind.Relative) it looks for C:\Images\btnImage.PNG, which is wrong. I’ve also tried Images/btnImage.PNG or ./Images/btnImage.PNG but then it looks for C:\MyProject\bin\Debug\Images\btnImage.PNG.

The only thing I get to work is an absolutely absolute URI – i.e. New Uri("C:/MyProject/Images/btnImage.PNG", UriKind.Absolute).

  1. Do custom controls only understand file system absolute URI’s?
  2. If 1 = No Then Return correctAnswer (please)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T17:40:49+00:00Added an answer on May 29, 2026 at 5:40 pm

    I ended up using pack URIs, but not without hitting a few snags along the way.

    Most examples don’t bother to mention you can’t use the “short version” pack URIs to refer to the current assemply if the projects a class library.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have tried every way I can think of with this, but just not
I have tried every install method I can think of to install RPy2 on
Have tried to find solutions for this and can't really come up with anything.
I have been looking everywhere and tried every suggestion I could find for this
I have tried making every div 75px and the table within the div but
I have searched and tried every example regarding singleton, public, and global variables in
I have looked on here and tried every answer available, but it is still
Hi i want to apply style on every 2nd <li> i have tried <script>
I'm truly stumped. I've tried every tool imaginable, checked every resource I can, and
Ok. I have scoured for hours. I can't seem to find the answer to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.