c# - WPF Secondary window snapshots main window -
an wpf project has mainwindow holding multiple books (in case one).
the pencil icon in fact button creating new instance of bookedit window , showing it. clicking should show following (and used so).
my issue recently, secondary window starts snapshotting mainwindow , showing portion of part of window:
and keeps doing when move window:
why happen? issue gpu/whatever? cannot test software on device.
i removed zindex solution.
edit 1:
it should noted books mainwindow generated behind using children.add
button newbutt = new button(); newbutt.background = null; newbutt.setresourcereference(control.styleproperty, "booktoolbarbutton"); newbutt.click += new routedeventhandler(filehandler.editbook); image pencil = new image(); pencil.source = new bitmapimage(new uri("pack://application:,,,/images/pencil.png")); newbutt.content = pencil; sp.children.add(newbutt);
editbook():
string name = (((sender button).parent stackpanel).parent grid).name; if (system.string.isnullorempty(name)) console.writeline("error: book not hold "); else { console.writeline("editting book {0}", name); bookedit bedit = new bookedit("books/" + name + ".json"); bedit.show(); }
Comments
Post a Comment