private void ListView_ItemClick(object sender, ItemClickEventArgs e)
        {
            var listViewItem          = MyListView.ContainerFromItem(e.ClickedItem) as ListViewItem;
            ContentItemDataModel item = (ContentItemDataModel)listViewItem.Content;

            ViewModel.EditingItem = item;
            Frame.Navigate(typeof(EditItemFrame));
        }
Exemplo n.º 2
0
        private void Edit_Click(object sender, RoutedEventArgs e)
        {
            var data = (sender as FrameworkElement).DataContext;
            var item = MyListView.ContainerFromItem(data) as ListViewItem;

            ViewModles.SelectItem = item.Content as MyList;
            if (MyBigList.Visibility.ToString() == "Collapsed")
            {
                Frame.Navigate(typeof(NewPage));
            }
        }
Exemplo n.º 3
0
        private void CheckBox_Checked(object sender, RoutedEventArgs e)
        {
            var  parent = VisualTreeHelper.GetParent(sender as DependencyObject);
            Line line   = VisualTreeHelper.GetChild(parent, 2) as Line;

            line.Opacity = 1;
            var    data = (sender as FrameworkElement).DataContext;
            var    item = MyListView.ContainerFromItem(data) as ListViewItem;
            string sql  = @"UPDATE MyToDo SET FINISH=? WHERE ID=?";

            using (var cus = conn.Prepare(sql))
            {
                cus.Bind(1, "true");
                cus.Bind(2, (item.Content as MyList).id);
                cus.Step();
            }
        }