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
Post a Comment