Trying to create an Image in Visual Studio 2022
I wrote this code to create an image (technically I created the image by using the Toolbox's XAML Controls) And I added the source tag and directed it to assets. But for some reason it doesn't render the image, as its just invisible. I also cant move the image element anymore.
12 Replies
Any reason why?
<Image x:Name="image" Source="/Assets/numbL-Logo.png" Width="300" Height="200" />
yes because u drag and drop the controls
$rulesofwpf
by drag and dropping controls u produce margins that can render your element off screen
margins are not supposed to be use to position items on screen but just adjust them slightly
didnt work
i cant see the image
even when i dont use margins
$paste your XAML to the below site so I can take a look
If your code is too long, you can post to https://paste.mod.gg/, save, and copy the link into chat for others to see your shared code!
and to make sure is this WPF?
or something else
is UWP