c# - Making it so I can close a pic once opened -


i have c# code linked xaml file builds gui. in gui, when click on option, photo appears, want. however, can't figure out how make user has option close photo. here's c# code:

public void help_click(object sender, routedeventargs e) {      image img;      img = new image();      uri diagram = new uri(@"pack://application:,,,/ptdgui;component/content/icons/controlmap.png", urikind.relativeorabsolute);      img.source = new bitmapimage(diagram);      canvasspace.children.add(img);             } 

image not based on control. may require customize behavior either writing custom control or trapping other control events close image.

this discsussion(stackoverflow) explains both options i've mentioned, should in understand , implementing rquired.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -