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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:55:48+00:00 2026-06-13T00:55:48+00:00

In my case path MyZooSnap.Core;component/Resources/Images/i.jpg . How to convert path for Android ImageView ?

  • 0

In my case path "MyZooSnap.Core;component/Resources/Images/i.jpg".
How to convert path for Android ImageView?
In order to use it in the following binding:

{'AssetImagePath':{'Path':'ImagePath'}}

More here

similar questions

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. Editorial Team
    Editorial Team
    2026-06-13T00:55:49+00:00Added an answer on June 13, 2026 at 12:55 am

    Quick answer:

    • if your Android image file is stored in assets/images/i1.png
    • then make sure it is marked as an AndroidAsset
    • then your path needs to be images/i1.png

    Longer answer:

    Ideally your ViewModel should be platform independent and not know about View concerns.

    So your ViewModel might perhaps expose a property like:

     private GameState _state;
     public GameState State 
     { 
         get { return _state; }
         set { _state = value; RaisePropertyChanged(() => State); }
     }
    

    where GameState is an enumeration like:

     public enum GameState
     {
         Stopped,
         Running,
         Paused,
         GameOver
     }
    

    you might then have images representing these states in an assets structure like:

    /assets/gamestates/stopped.png
    /assets/gamestates/running.png
    /assets/gamestates/paused.png
    /assets/gamestates/gameover.png
    

    where each of those files is marked with BuildAction of AndroidAsset.

    To then display the correct image in the UI, you would need a value converter like:

    public class GameStateConverter
        : MvxBaseValueConverter
    {
        public override object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return string.Format("gamestates/{0}.png", ((GameState)value).ToString().ToLower());
        }
    }
    

    mapped in using a Converters wrapper like:

    public class Converters
    {
        public readonly GameStateConverter GameState = new GameStateConverter();
    }
    

    which is configured in setup.cs using:

        protected override IEnumerable<Type> ValueConverterHolders
        {
            get { return new[] { typeof(Converters) }; }
        }
    

    With this in place, then your axml binding statement would be:

        {'AssetImagePath':{'Path':'State', 'Converter':'GameState'}}
    

    For an alternative approach using resources instead of assets, see MvxButtonIconBinding in Іssue with binding to GridLayout to Android

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

Sidebar

Related Questions

I have the following code: use strict; my $org_file_hash = { 'S6' => '/path/to/file/filename.txt_S6',
I'm trying to draw custom UI (a path in this case) on top of
Simple case of trying to prove I can convert NSString to NSDate . Create
Should i use this form of switch statement: switch(msg) { case WM_LBUTTONDOWN: { char
I have the following form: <form class=lift:form.ajax> <input type=hidden class=lift:StreamIn id=path value=PATH /> <input
File f = new File(path) How to give the path parameter in this case?
Case in point : I've got a handle to a window (for instance, using
Case One: new Date(Date.parse(Jul 8, 2005)); Output: Fri Jul 08 2005 00:00:00 GMT-0700 (PST)
Case example: I have a long list of items, and when I put my
Case One Say you have a little class: class Point3D { private: float x,y,z;

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.