Exemplo n.º 1
0
        private void TextBlock_MouseDown(object sender, MouseButtonEventArgs e)
        {
            Label            tb  = e.OriginalSource as Label;
            ContentPresenter cp  = tb.TemplatedParent as ContentPresenter;
            axisEntity       stu = cp.DataContext as axisEntity;

            MessageBox.Show(stu.AxisName);
        }
Exemplo n.º 2
0
        private void Axis_ls_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            int a = 10;


            ListBox tb = e.OriginalSource as ListBox;

            ContentPresenter cp  = tb.TemplatedParent as ContentPresenter;
            axisEntity       stu = cp.DataContext as axisEntity;

            MessageBox.Show(stu.AxisName);
        }