How to pass Background Image from MainPage to object page from List View

michalgizamichalgiza Member ✭✭
edited January 2 in Xamarin.Forms

Hello developers !

I'm begginer in xamarin and also in any programming language :wink: I'm just wondering how can i pass a background image to be displayed dependent on string i will pass from my list view where i displaying list of object , i'm storing in each object different background image as a string . I want to unify this becouse for purpose of my project i want to refer to just one page insted of 14. My goal is to have list of items and after clicking specific one , user moves to new page where see background image and text which is bind to object from model.
I tried to add this throught binding on Background Image property in my page.xaml code like but it's not working. :disappointed: :tired_face:

<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="PersonApp.Views.PersonDetailPage"
             BackgroundImage="{x:Binding Person.Image}">

I don't know how to move on from this becouse at time when i'm writing i cannot figure it out how to pass parameter background image on new page :(

Do you have some tutorial i'm missing to do so ?
How should i pass Background image as binable parameter , should create this var as ImageSource type ?

Best Answer

Answers

Sign In or Register to comment.