Click here to Skip to main content
15,889,335 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
In a Grid layout:
R1c4ImageButton should be diamond but nothing appears,
R2c2ImageButton should be octagon but nothing appears,
R2c3ImageButton should be oval but octagon appears,
R2c4ImageButton should be pentagon but oval appears.

All of the Source names are valid images and work if I change during Debug with Hot Load and in the C# coding.
All of the ImageButtons are valid and work with Source changes during Debug with Hot Load and in C# coding.

The XAML code is:
XML
<ImageButton x:Name="R1c1ImageButton"
 Grid.Column="0"
 Grid.Row="0"
 Source="arrow"
 Clicked="R1c1ImageButton_Clicked">
<ImageButton x:Name="R1c2ImageButton" 
 Grid.Column="1"
 Grid.Row="0"
 Source="circle"
 Clicked="R1c2ImageButton_Clicked">
<ImageButton x:Name="R1c3ImageButton" 
 Grid.Column="2"
 Grid.Row="0"
 Source="cross"
 Clicked="R1c3ImageButton_Clicked">
<ImageButton x:Name="R1c4ImageButton" 
 Grid.Column="3"
 Grid.Row="0"
 Source="diamond"
 Clicked="R1c4ImageButton_Clicked">
<ImageButton x:Name="R2c1ImageButton" 
 Grid.Column="0"
 Grid.Row="1"
 Source="hexagon"
 Clicked="R2c1ImageButton_Clicked">
<ImageButton x:Name="R2c2ImageButton" 
 Grid.Column="1"
 Grid.Row="1"
 Source="octagon"
 Clicked="R2c2ImageButton_Clicked">
<ImageButton x:Name="R2c3ImageButton" 
 Grid.Column="2"
 Grid.Row="1"
 Source="oval"
 Clicked="R2c3ImageButton_Clicked">:
<ImageButton x:Name="R2c4ImageButton" 
 Grid.Column="3"
 Grid.Row="1"
 Source="pentagon"
 Clicked="R2c4ImageButton_Clicked">


What I have tried:

If I retype the Source name in Debug, Hot Load will change the image.
If I then Save and close the solution and reopen I get the same erroneous display.

I have closed and reopened Visual Study, Solution, and even created release and installed on a separate tablet and still see the same display.
Posted
Updated 12-Mar-21 16:24pm
v3
Comments
Member 14838881 12-Mar-21 22:50pm    
I have gone through and made all of the Source=" " which during Hot Reload made all of the ImageButtons blank. I closed debug, saved all, and then closed the solution. Reopened the Solution. The XAML file showed all of the Source=" ". However the debug continued to show the same erroneous images. Is there a way to somehow reset or clean out all stored/saved images? Or any other suggestions?

1 solution

I would imagine all of the ="" would have to be removed. There's no attribute name in from of them so that's not valid XAML.
 
Share this answer
 
Comments
Member 14838881 12-Mar-21 22:26pm    
The ="" were only shown in error in the code submitted here. They were not in the program code. I have edited the code now showing to match the actual code in the program. Please help.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900