Exemplo n.º 1
0
        private void ElementSquare_OnPreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            var elementBlocks = VisualTreeHelpers.FindAllChildren <TextBlock>(sender as Border);

            SelectedElement = (elementBlocks.ToList()[0].Tag as Element);
            ElementSelected?.Invoke(sender, new ElementEventArgs {
                SelectedElement = this.SelectedElement
            });
        }