wpf - Problems in dynamically generating an Image in silverlight -


I am dynamically adding an image to a canvas object which was working for a while and suddenly a particular The reason for showing stopped. / P>

Here is the code:

  Public Zero ShootProject () {var projectile image = new image (); Var currChar = (letter Ref.SCharacterProjectile) lstSubMenu.SelectedItem; Project image .name = punk Uri Image URI = New Uri ("/ Images / Projects /" + Krucher.PrestileName + ".png", Urikhind.Relative); Projector image. Heights = curr. ProjectileImage.Width = currChar.projectileWidth; Var currPuppet = pg.PuppetList.SingleOrDefault (p = & gt; PP.pipidid == turn-ind); Var projectile Y = Convert. ToDouble (pcCombatArea.PhysicsObjects [currPuppet.CharacterName + "torso"]. GetValue (Canvas TopProperty)); Var Projectile X = Convert.Double (PCCMhetAria.FixicsObjects [Karuppet.CaracterName + "Fusel"]. GetValue (Canvas. Leftproperty)); If (currPuppet.faceRight) {projectile X + = currPuppet.elbowToArmpit + currPuppet.elbowToHandTip; } And {projectilex - = currPuppet.elbowToArmpit + currPuppet.elbowToHandTip; } Projector image .set value (canvas, leftproperty, projectile X); Projector image .set value (canvas property, progasili y); CnvGame.Children.Add (projectileImage); Project Image. Source = new bitmap image (Image Yuri); Projector image. Image opend + = new event handler & lt; Routing Avent Arges & gt; (Projects Image_maj Open); }  

The top and left values ​​are well in the canvas size range, (canvas is 800 to 600, whereas coordinates are 200, 100). I can get images in canvas children, and the URL looks fine, I checked it again. I set the resource to set up PNG image but it has no advantage. If you see that I have also added an image opend which is not being triggered.

If you have the image to be created on the type processing, then the image will be the main ' Try to delete.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -