wpf controls - Showing a new Window right next to a DataCell in DataGrid (WPF) -
i want scenario when user clicks on cell in datagrid in wpf, want open numpad next (this touch based input). numpad, understand separate window.
1) how can know cell selected
2) how can show numpad next cell?
3) how can find coordinates of cell position numpad?
4) how can set value of cell based on numpad entry?
numpad wpf user control in same application. datagrid .net 4 control. it's normal windows desktop application
this not trivial task , should have knowledge of wpf accomplish this, here ideas might for:
- the
datagridcell.isselectedproperty tells whether cell selected. - i use
popupshow numpad directly besides cell. - if use
popupnot need coordinates, can specify relative placement usingpopup.placementproperty. see msdn document: popup placement behavior - you try use binding numpad user control in datagridcell.
using datagrid.cellstyle or datagridcolumn.cellstyle property can specify alternate style cells of datagrid or specific column. within style, change template , add popup opened if current cell selected. can achieve binding popup.isopen property datagridcell.isselected property.
this initial idea. still have have @ provided msdn links , read other stuff wpf. although might take time learn 'wpf way' (i.e. xaml), (in eyes) easier using lots of code-behind determine selected cell, positioning control @ correct location, transferring data numpad cell , on...
Comments
Post a Comment