0

The UWP application does not display an image so I do not. Here is my code

<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Pivot>
            <PivotItem Header="Write">
                <ScrollViewer>
                    <StackPanel Loaded="WriteStackPanel_Loaded" Orientation="Vertical">
                        <TextBlock
                            x:Name="WriteText_1"
                            Margin="0,10,0,0"
                            Text="text 1"
                            TextWrapping="Wrap" />
                        <TextBlock
                            x:Name="WriteText_2"
                            Margin="0,10,0,0"
                            Text="text 2"
                            TextWrapping="Wrap" />
                        <Grid Height="70" Margin="0,10,0,0">
                            <Image Stretch="Uniform" Source="Assets\AppData\About\Checks\write_image_1.png" />
                        </Grid>
                    </StackPanel>
                </ScrollViewer>
            </PivotItem>
        </Pivot>
    </Grid>

I also did the following 1) Build action is set to content.

2) And try to set always **copy to output directory" in your image properties. As was said here. It does not go in the application, but in the constructor in Visual Studio everything is there. Screen folder Assets

1 Answers1

1

I have looked at the screenshot of your Assets folder and it indeed seems there is no write_image_1.png image in the Assets\AppData\About\Checks folder, there is only a text_write.txt file.

If the image is in this folder (in file explorer), it is probably just not included. Click the Show all files button in the top toolbar of the Solution Explorer to display all files. Then right-click the image file and select Include In Project.

Martin Zikmund
  • 38,440
  • 7
  • 70
  • 91