c# - WPF Secondary window snapshots main window -


an wpf project has mainwindow holding multiple books (in case one).

mainwindow

the pencil icon in fact button creating new instance of bookedit window , showing it. clicking should show following (and used so).

bookedit

my issue recently, secondary window starts snapshotting mainwindow , showing portion of part of window:

snapshot

and keeps doing when move window:

snapshot conservation

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

Popular posts from this blog

serialization - Convert Any type in scala to Array[Byte] and back -

matplotlib support failed in PyCharm on OSX -

python - Matplotlib: TypeError: 'AxesSubplot' object is not callable -