Ways to identify which cell was clicked on WPF Grid?
I have a 3x3 matrix grid. If a user on particular cell, how can I identify the cell cordinates after click? Please advise. thanks PJ Assuming you're designing a tic-tac-toe style game, and the grid in question is the standard WPF Grid, I'd imagine you'd be best putting a control in each separate cell. That way you can hook into mouse events for each, like so: <Window x:Class="WpfApplication1.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300"> <Grid ShowGridLines="True"> <Grid