[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now


Phone 8 Emulator Not Showing Images

Posted on 2014-01-18
Medium Priority
Last Modified: 2014-11-12
I am building a phone 8 app which uses the Tap event when a button is tapped.

Debug testing with a stop point shows that the event is triggered.

    void cmdHole1_Tap(object sender,
                     System.Windows.Input.GestureEventArgs e)
        // Place image into imgHole1
            imgHole1.Source = imgC1Clip.Source;  // This works
            int intTest1 = 1;


The issue is that the emulator does not display the button image.

The button image is displayed in design mode.

I am using the default emulator: WVGA 512MB and running Windows 8 Pro.

See file images:

How do I fix this?

Question by:Dovberman
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3

Author Comment

ID: 39790706
Here is the xaml code for the hole cards:

        <Grid x:Name="grdHole" Margin="183,400,183,286" Background="DarkOliveGreen"
              Height="72" Width="114" HorizontalAlignment="Center"  >
                <ColumnDefinition x:Name="grdHole1"
                </ColumnDefinition >


            <!--Place buttons in the grid-->
            <Button Content="Button"  x:Name="cmdHole1" Grid.Column="0" Width="50" Height="72"
                    HorizontalAlignment="Center" Margin="4,0,0,0" Grid.RowSpan="1" Cursor="Hand"

            <Image x:Name="imgHole1"
                Width ="48"
                Grid.Column="0" Stretch="None"
            <Button Content="Button" x:Name="cmdHole2" Grid.Row="0" Grid.Column="1" Width="50" Height="72"
                    HorizontalAlignment="Center" Margin="4,0,0,0" Grid.RowSpan="1">
            <!--Place images in the grid-->
            <Image x:Name="imgHole2"
                     Width ="48" Source="C:\Develop\Apps\Holdem\Images\cards_png\C2Full.png"
                     Grid.Column="1" Stretch="None"


  <TextBox x:Name="PickHoleInstr" HorizontalAlignment="Left" Height="60" TextWrapping="NoWrap"
                Text="Tap to select your hole cards."
                Margin="72,250,0,0" VerticalAlignment="Top" Width="261"
                FontSize="16" Background="Transparent" BorderThickness="0"
                Foreground="White" FontWeight="Bold"/>

Accepted Solution

Dovberman earned 0 total points
ID: 39796887
The issue was in the image source.

 <Image x:Name="imgHole1"
                Width ="48"
                Grid.Column="0" Stretch="None"

The phone knows nothing about the developer's hard drive.
Images need to be imported to a Project folder.

In this case I created a project folder named Images and imported all the images from my
hare drive folder to the Project->Images folder.

Author Closing Comment

ID: 39796895
Hope this is useful to other phone app developers.

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you use NetMotion Mobility on your PC and plan to upgrade to Windows 10, it may not work unless you take these steps.
Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
This Micro Tutorial will teach you how to reformat your flash drive. Sometimes your flash drive may have issues carrying files so this will completely restore it to manufacturing settings. Make sure to backup all files before reformatting. This w…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question