Monday, 15 August 2011

c# - WPF Clickevent for Grid (zIndex=0) which is behind another Grid (zIndex =1) -



c# - WPF Clickevent for Grid (zIndex=0) which is behind another Grid (zIndex =1) -

i seek create grids. on every grid have mouse-eventlistener, fire event when go mouse on grid. create big grid zindex = 1 , rowspan = 3. grid located in front end (because of zindex = 1). have problems fire events of grids lay behind big grid zindex = 1. how can fire events of grid located behind big grid?

simple code example:

<grid> <grid.rowdefinitions> <rowdefinition height="1*"/> <rowdefinition height="1*"/> <rowdefinition height="1*"/> <rowdefinition height="1*"/> <rowdefinition height="1*"/> <rowdefinition height="1*"/> </grid.rowdefinitions> <grid grid.row="0" background="aliceblue"/> <grid grid.row="1" grid.rowspan="3" panel.zindex="1" background="aqua" opacity="0.2" previewmousemove="grid_previewmousemove_1"/> <grid grid.row="2" previewmousemove="grid_previewmousemove" background="antiquewhite"/> <grid grid.row="3" previewmousemove="grid_previewmousemove" background="beige"/> <grid grid.row="4" previewmousemove="grid_previewmousemove" background="bisque"/> <grid grid.row="5" previewmousemove="grid_previewmousemove" background="blanchedalmond"/> </grid>

set ishittestvisible false grid zindex 1.

for more info : ishittestvisible

c# wpf grid mouseevent z-index

No comments:

Post a Comment