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 128941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T05:42:54+00:00 2026-05-11T05:42:54+00:00

Seem to be having a lot of problems doing what should be simple things

  • 0

Seem to be having a lot of problems doing what should be simple things with XAML / WPF – I have created some XAML-based images using shapes like Rectangle and Ellipse to create icons which I need other parts of my application to use – but I cannot seem to find out how to do this – I seem to be able to store a Canvas in the Resource Dictionary but no way of using it in any other Window. How is this done – these are simple images just two or three shapes I want to use throughout my project!
The images must also be resizable – I know how to store paths, however these shapes contain gradient styles I want preserved plus I don’t know how the rectangle could convert to path and colour data.

Thanks!

  • 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. 2026-05-11T05:42:54+00:00Added an answer on May 11, 2026 at 5:42 am

    You should use a Drawing and display it using a DrawingBrush like KP Adrian suggested or a DrawingImage and an Image control, but if you can’t use a drawing you can use a Canvas inside a VisualBrush.

    <Page xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'         xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'> <Page.Resources>     <VisualBrush x:Key='Icon'>         <VisualBrush.Visual>             <Canvas Width='10' Height='10'>                 <Ellipse Width='5' Height='5' Fill='Red'/>                 <Ellipse Width='5' Height='5' Fill='Blue' Canvas.Left='5' Canvas.Top='5'/>             </Canvas>         </VisualBrush.Visual>     </VisualBrush> </Page.Resources>     <Rectangle Width='100' Height='100' Fill='{StaticResource Icon}'/> </Page> 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Seem to be having some issues storing the current date in a core data
I've been having a lot of trouble with this problem. I have a listview
I've been having this problem a lot recently in some form or another. Lets
I am having an issue that is stumping me. I have a relatively simple
I seem to be having problems with this and I cannot seem to figure
Im making a class in php, but Im having some problems with one of
I have a simple jquery auto complete search in my Rails 3 app based
I am writing my first Android application and have some problems with handing around
I'm having some trouble deciding how two classes should interact and the problem I'm
I seem to be having a problem removing the image in UIScrollView. I was

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.