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

  • Home
  • SEARCH
  • 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 8309113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T19:00:31+00:00 2026-06-08T19:00:31+00:00

Here is what I have so far: <Image Source={Binding ImageSource} /> <Button ContentText ImageSource=path/image.png

  • 0

Here is what I have so far:

<Image Source="{Binding ImageSource"} />

<Button Content"Text" ImageSource="path/image.png" />

I know something isn’t right here. I guess I can’t see where ImageSource is defined.

I have several of these buttons and just want to have a unique image for each one. I have a button template that I am using and it works great for the text.

<Label Content="TemplateBinding Content" />

Thanks for all your help!

  • 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-06-08T19:00:35+00:00Added an answer on June 8, 2026 at 7:00 pm

    In your case, it can be very easy!

    Add the images as resources to your project, then in XAML
    use something like the following:

    <Button HorizontalAlignment="Left" Margin="20,0,0,20" VerticalAlignment="Bottom" Width="50" Height="25">
        <Image Source="image.png" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0">
        </Image>
    </Button>
    

    Or, the more complicated way:

    If you use the MVVM Pattern, you can do the following

    In your XAML:

    <Button Focusable="False" Command="{Binding CmdClick}" Margin="0">
        <Image Source="{Binding ButtonImage}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0">
        </Image>
    </Button>
    

    In your ViewModel:

    private Image buttonImage;
    
    public Image ButtonImage 
    {
        get
        {
           return buttonImage;
        }
    }
    

    And somewhere in the constructor of your ViewModel or the initialisation of it:

    BitmapImage src = new BitmapImage();
    src.BeginInit();
    src.UriSource = new Uri("image.png", UriKind.Relative);
    src.CacheOption = BitmapCacheOption.OnLoad;
    src.EndInit();
    
    buttonImage = new Image();
    buttonImage.Source = src;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

http://pastebin.com/mYk8M038 here is what I have so far... I think it may be something
Here is what I have so far : def mergesort[T <: Ordered[T]](elements : List[T])
I'm using the Firefox Add-on Builder and here is what I have so far:
I'm fairly new to JS, here's what I have so far. I can get
I'm a total newb to LINQ. Here is the code I have so far:
Here is what I have tried thus far: > cd /Applications/MAMP/bin/php5/bin/ > ./pear channel-discover
I really wonder why this question hasn't popped up here so far. I have
In my Canvas, I have an image object. I haven't set a source in
Here is the code that I have so far to define the icon: icon_bg
I have a document with dynamic image and dynamic text and would like the

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.