Referencing an image in Splash Screen

281
6
12-06-2021 09:44 AM
JohnnyHarley232
New Contributor III

I am creating a custom splash screen with an image being referenced in the pane. Currently I have

<Image Source="Images/trekk.jpg" />

 Trekk.jpg is in the Images folder of the project. When I save and build the project.... and start debugging... The splash screen displays with all my changes except for the Image being shown. 

Is there something further I need to do?

Tags (1)
0 Kudos
6 Replies
KirkKuykendall1
Occasional Contributor III

Did you try setting Grid.Background to an ImageBrush?

This works for me ...

KirkKuykendall1_0-1638813515613.png

 

0 Kudos
JohnnyHarley232
New Contributor III

Kirk, 

Thanks for the response back. I dont want the logo to be a background since I already have a desired background in place. I have attached a screenshot of my current product in the designer and snippet of the relevant code. 

JohnnyHarley232_0-1638813991295.png

 

 

0 Kudos
KirkKuykendall1
Occasional Contributor III

What are your build action, and copy to output settings set to?

KirkKuykendall1_0-1638814577970.png

 

0 Kudos
JohnnyHarley232
New Contributor III

 

Kirk, Attached is the setting for that photo. Is there any other setting I need to look at when building the solution?

JohnnyHarley232_1-1638846238381.png

 

0 Kudos
GintautasKmieliauskas
Regular Contributor II

Hi,

Have you tried like this:

<Image Source="/your_config_name;component/Images/trekk.png"/>

 

 

0 Kudos
KirkKuykendall1
Occasional Contributor III

The original question has

 

<Image Source="Images/trekk.jpg" />

 

But the follow-up post has 

KirkKuykendall1_0-1638896542504.png

Esri's default when creating a splash via New>Project .... Pro Managed Configuration results in a project with a UI and Images folders.

KirkKuykendall1_1-1638896711610.png

Notice how the Source path in the xaml in the UI folder has a relative path to the images in the Images folder:

KirkKuykendall1_2-1638896886117.png

 

So, if your xaml is in a (UI) folder that is a sibling to the Images folder, perhaps try using a ".." for the relative path in the Source.

 

 

 

0 Kudos