Visual Studio 2017 - Where is ResourceId after making an image an Embedded Resource

I'm not sure if I'm posting to the right area, so please tell me if I haven't.

I'm currently trying to develop a Xamarin.Forms app for use on Android and iOS and are currently trying to display an image as a background.
I'm following a course and it states that when you change the properties of an image to "Embedded Resource", it should show the 'ResourceId'.

When changing the image to "Embedded Resource", nothing in the properties pane changes at all to show ResourceID.
When doing the same thing in Visual Studio for Mac, it shows the ResourceID (note: I can set the resource ID in Visual Studio for Mac and it will compile properly on the Windows VS, but it still doesn't show the ResourceID.

I've tried multiple projects, and can't get it to work. Am I maybe missing something?

Thanks heaps.

Answers

  • AndreiMungiuAndreiMungiu DKMember

    I have exactly the same problem, please help!

  • Been over a month and no solution yet... Gives me little hope it would do anytime soon... :neutral:

  • AyalaFuksAyalaFuks USMember

    I have exactly the same issus please help me!!!!!

  • fo0fo0fo0fo0 Member ✭✭

    I have also the same issue .Please hep us :(

  • ShantimohanElchuriShantimohanElchuri USMember ✭✭✭✭✭

    @Beau-DeanAdams and others, Are you trying to set the Bacground image at Page level?

  • fo0fo0fo0fo0 Member ✭✭

    If I change the image file property Build Action to 'Embedded Resource' ,the ResourceID doesn't appear .
    This is the screenshot of my property pane

  • ShantimohanElchuriShantimohanElchuri USMember ✭✭✭✭✭

    I have only set the BuildAction to AndroidResource or BundledResource and then just it at page level as,

    <ContentPage ... ... ...
          BackgroundImage="MyImage.png" >
    
    </ContentPage>
    

    I have never used any ResourceId. Can you give excerpts from the course where this was used?

  • fo0fo0fo0fo0 Member ✭✭

    Thank you for your kind response.

    I'm using this method in code behind :
    public Images ()
    {
    InitializeComponent ();
    //here must be ResourceID but it doesn't work with me
    image.Source = ImageSource.FromResource("MyXamarine_2.Images.background.jpg");

        }
    

    On page level

        <StackLayout>
            <Image Aspect="AspectFill" x:Name="image"/>
        </StackLayout>
    
  • Og73Og73 Member

    Has this been resolved by anyone, I'm having the same issue...

Sign In or Register to comment.