protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
        {
            CustomGridViewItemInfo tile = item as CustomGridViewItemInfo;

            if (tile != null)
            {
                GridViewItem griditem = element as GridViewItem;
                if (griditem != null)
                {
                    griditem.HorizontalContentAlignment = Windows.UI.Xaml.HorizontalAlignment.Stretch;
                    griditem.VerticalContentAlignment   = Windows.UI.Xaml.VerticalAlignment.Stretch;

                    if (this.LayoutSize == LayoutSize.Small && tile.ExampleHighlightInfo != null)
                    {
                        this.SetRowAndColumnSpan(griditem, 3, 3);
                    }
                    else if (this.LayoutSize == LayoutSize.Medium && tile.ColumnSpan >= 4)
                    {
                        this.SetRowAndColumnSpan(griditem, tile.RowSpan - 2, tile.ColumnSpan - 2);
                    }
                    else
                    {
                        this.SetRowAndColumnSpan(griditem, tile.RowSpan, tile.ColumnSpan);
                    }
                }
            }

            base.PrepareContainerForItemOverride(element, item);
        }
Exemplo n.º 2
0
        //
        public virtual void PopulatePropertyList(ElementProperty prop)
        {
            // Remove Observer
            m_GridView.SetDataChangeObserver(null);
            m_GridView.RemoveAll();

            PropertyObject propObj = null;
            GridViewItem   itemSub = null;

            prop.InitPropertyMap();

            // Use var keyword to enumerate dictionary
            foreach (var pair in prop.List)
            {
                propObj = pair.Value;
                m_GridView.AddItem(0, 0, propObj.Name);
                itemSub            = m_GridView.AddItem(0, 1, "", propObj.Type);
                itemSub.m_ItemData = propObj;
                // May be not necessary if use this in the object itself..
                //SetProValues(prop, propObj.Name, itemSub);
                itemSub.m_Data = propObj.List;
            }
            // Will be used as Adapter object's data
            m_GridView.Tag = prop;
            m_GridView.SetDataChangeObserver(this);
        }
Exemplo n.º 3
0
        private void Image_PointerEntered(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
        {
            Image senderImg = sender as Image;

            senderImg.Blur(value: 0, duration: 100, delay: 0).StartAsync();
            //senderImg.Scale(centerX: 50.0f, centerY: 50.0f, scaleX: 3.0f, scaleY: 3.0f, duration: 100, delay: 0).StartAsync();

            Grid itemGrid = VisualTreeHelper.GetParent(senderImg) as Grid;
            ListViewItemPresenter lvip = VisualTreeHelper.GetParent(itemGrid) as ListViewItemPresenter;
            GridViewItem          gvi  = VisualTreeHelper.GetParent(lvip) as GridViewItem;
            ItemsWrapGrid         grid = VisualTreeHelper.GetParent(gvi) as ItemsWrapGrid;

            string senderAutomationId = AutomationProperties.GetAutomationId(senderImg);

            foreach (GridViewItem item in grid.Children)
            {
                ListViewItemPresenter lviPresenter = VisualTreeHelper.GetChild(item, 0) as ListViewItemPresenter;
                Grid  imageGrid = VisualTreeHelper.GetChild(lviPresenter, 0) as Grid;
                Image image     = VisualTreeHelper.GetChild(imageGrid, 0) as Image;

                string imageAutomationId = AutomationProperties.GetAutomationId(image);

                if (imageAutomationId != senderAutomationId)
                {
                    image.Blur(value: 2.5, duration: 300, delay: 0).StartAsync();
                    //image.Scale(centerX: 0.0f, centerY: 0.0f, scaleX: 1.0f, scaleY: 1.0f, duration: 100, delay: 0).StartAsync();
                }
            }
        }
        private void NumberBox_ValueChanged(Microsoft.UI.Xaml.Controls.NumberBox sender, Microsoft.UI.Xaml.Controls.NumberBoxValueChangedEventArgs args)
        {
            if (StyledGridIWG == null)
            {
                return;
            }

            // Only update either max-row value or margins
            if (sender == WrapItemCount)
            {
                StyledGridIWG.MaximumRowsOrColumns = (int)WrapItemCount.Value;
                return;
            }

            int rowSpace    = (int)RowSpace.Value;
            int columnSpace = (int)ColumnSpace.Value;

            for (int i = 0; i < StyledGrid.Items.Count; i++)
            {
                GridViewItem item = StyledGrid.ContainerFromIndex(i) as GridViewItem;

                Thickness NewMargin = item.Margin;
                NewMargin.Left   = columnSpace;
                NewMargin.Top    = rowSpace;
                NewMargin.Right  = columnSpace;
                NewMargin.Bottom = rowSpace;

                item.Margin = NewMargin;
            }
        }
Exemplo n.º 5
0
        private void StyledGrid_IncreaseColSpace(object sender, RoutedEventArgs e)
        {
            ActualColSpace += 1;

            // Update text box with newly increased value
            ColSpace.Text            = ActualColSpace.ToString();
            ColSpace.PlaceholderText = ActualColSpace.ToString();
            ColSpacesDec.IsEnabled   = true;

            // Increase left/right margin on all GridViewItems
            for (int i = 0; i < StyledGrid.Items.Count; i++)
            {
                GridViewItem item = StyledGrid.ContainerFromIndex(i) as GridViewItem;

                // Create a Thickness property to bind to each item's Margin property.
                // Use existing margin and only change relevant values (left/right)
                Thickness NewMargin = item.Margin;
                NewMargin.Left  = item.Margin.Left + 1;
                NewMargin.Right = item.Margin.Right + 1;

                item.Margin = NewMargin;
            }

            NotifyPropertyChanged();
        }
        public void PreserveFocus()
        {
            //requires SelectionMode = Single
            var selection = stationsGridView.SelectedItem;

            focusedItem = (GridViewItem)stationsGridView.ContainerFromItem(selection);
        }
Exemplo n.º 7
0
        protected override void SetSelectedItemsOnUi(List <ListedItem> selectedItems)
        {
            // To prevent program from crashing when the page is first loaded
            if (selectedItems.Count > 0)
            {
                foreach (ListedItem listedItem in FileList.Items)
                {
                    GridViewItem gridViewItem = FileList.ContainerFromItem(listedItem) as GridViewItem;

                    if (gridViewItem != null)
                    {
                        List <Grid> grids = new List <Grid>();
                        Interaction.FindChildren <Grid>(grids, gridViewItem);
                        var rootItem = grids.Find(x => x.Tag?.ToString() == "ItemRoot");
                        rootItem.CanDrag = selectedItems.Contains(listedItem);
                    }
                }
            }

            // Required to check if sequences are equal, if not it will result in an infinite loop
            // between the UI Control and the BaseLayout set function
            if (Enumerable.SequenceEqual <ListedItem>(FileList.SelectedItems.Cast <ListedItem>(), selectedItems))
            {
                return;
            }
            FileList.SelectedItems.Clear();
            foreach (ListedItem selectedItem in selectedItems)
            {
                FileList.SelectedItems.Add(selectedItem);
            }
            FileList.UpdateLayout();
        }
Exemplo n.º 8
0
        // Code not in use. a Old solution i had for the gridview

        /// <summary>
        /// Creates the book cover.
        /// </summary>
        /// <param name="url">The URL.</param>
        /// <returns></returns>
        public GridViewItem CreateBookCover(string url)
        {
            GridViewItem gridViewItem = new GridViewItem();

            gridViewItem.Content = CreateImage(url);
            return(gridViewItem);
        }
Exemplo n.º 9
0
        private async void FileList_ChoosingItemContainer(ListViewBase sender, ChoosingItemContainerEventArgs args)
        {
            // This resizes the items after the item template has been changed and reloaded
            if (itemTemplateChanging)
            {
                itemTemplateChanging = false;
                Behaviors.StretchedGridViewItems.ResizeItems(FileList);
            }

            if (args.ItemContainer == null)
            {
                GridViewItem gvi = new GridViewItem();
                args.ItemContainer = gvi;
            }
            args.ItemContainer.DataContext = args.Item;

            InitializeDrag(args.ItemContainer);
            if (args.Item is ListedItem item && !item.ItemPropertiesInitialized)
            {
                args.ItemContainer.PointerPressed += FileListGridItem_PointerPressed;
                args.ItemContainer.CanDrag         = args.ItemContainer.IsSelected; // Update CanDrag

                item.ItemPropertiesInitialized = true;

                await ParentShellPageInstance.FilesystemViewModel.LoadExtendedItemProperties(item, currentIconSize);
            }
        }
        private void ThumbnailList_Click(object sender, ItemClickEventArgs e)
        {
            GridView         gridView = (GridView)sender;
            GridViewItem     item     = (GridViewItem)gridView.ContainerFromItem(e.ClickedItem);
            CompositionImage image    = VisualTreeHelperExtensions.GetFirstDescendantOfType <CompositionImage>(item);

            // We are about to transition to a new page.  Cancel any outstanding transitions.
            if (_currentTransition != null)
            {
                if (!_currentTransition.Completed)
                {
                    _currentTransition.Cancel();
                }
                _currentTransition = null;
            }

            DetailsInfo info;

            info.thumbanil = (Thumbnail)e.ClickedItem;

            // Setup the new transition and trigger the navigation
            ConnectedTransition transition = new ConnectedTransition();

            transition.Initialize(Frame, image, info);

            Frame.Navigate(typeof(CustomConnectedAnimationDetail), transition);
        }
Exemplo n.º 11
0
        private void CreateSymbolList()
        {
            GridView gridView = new GridView();

            foreach (Symbol bol in Enum.GetValues(typeof(Symbol)))
            {
                StackPanel sp = new StackPanel {
                    Width = 100, Height = 100
                };
                sp.Children.Add(new SymbolIcon(bol)
                {
                    Foreground          = new SolidColorBrush(Windows.UI.Colors.AntiqueWhite),
                    HorizontalAlignment = HorizontalAlignment.Stretch,
                    VerticalAlignment   = VerticalAlignment.Stretch, Margin = new Thickness(0, 33, 0, 0)
                });
                sp.Children.Add(new TextBlock {
                    Text = bol.ToString(), Foreground = new SolidColorBrush(Windows.UI.Colors.AntiqueWhite), TextAlignment = TextAlignment.Center, HorizontalAlignment = HorizontalAlignment.Stretch
                });
                GridViewItem item = new GridViewItem
                {
                    Content = sp
                };



                gridView.Items.Add(item);
            }

            symbolPivotItem.Content = gridView;
        }
Exemplo n.º 12
0
        private void EndRename(TextBox textBox)
        {
            if (textBox == null || textBox.Parent == null)
            {
                // Navigating away, do nothing
            }
            else if (FolderSettings.LayoutMode == FolderLayoutModes.GridView)
            {
                Popup     popup     = textBox.Parent as Popup;
                TextBlock textBlock = (popup.Parent as Grid).Children[1] as TextBlock;
                popup.IsOpen = false;
            }
            else if (FolderSettings.LayoutMode == FolderLayoutModes.TilesView)
            {
                Grid      grid      = textBox.Parent as Grid;
                TextBlock textBlock = grid.Children[0] as TextBlock;
                textBox.Visibility   = Visibility.Collapsed;
                textBlock.Visibility = Visibility.Visible;
            }

            textBox.LostFocus         -= RenameTextBox_LostFocus;
            textBox.KeyDown           -= RenameTextBox_KeyDown;
            FileNameTeachingTip.IsOpen = false;
            IsRenamingItem             = false;

            // Re-focus selected list item
            GridViewItem gridViewItem = FileList.ContainerFromItem(RenamingItem) as GridViewItem;

            gridViewItem?.Focus(FocusState.Programmatic);
        }
Exemplo n.º 13
0
        private void btnGo_Click(object sender, RoutedEventArgs e)
        {
            if (!_user.IsAdmin)
            {
                btnAddToCart.Visibility = Visibility.Visible;
            }
            if (gvSearch.Items != null)
            {
                gvSearch.Items.Clear();
            }
            gvSearch.Visibility = Visibility.Visible;
            lblSR.Visibility    = Visibility.Visible;

            foreach (var h in data.Services.Where(h => h.Type.Name.ToLower() == "hotel"))
            {
                if (!h.ServiceValues.Any(namai => namai.Value.Contains(txtHotel.Text)))
                {
                    continue;
                }
                var g = new GridViewItem
                {
                    Name    = "" + h.Id,
                    Content = h.ToString(),
                    Width   = 300,
                    Height  = 150
                };
                if (gvSearch.Items != null)
                {
                    gvSearch.Items.Add(g);
                }
            }
        }
        private void Button_PreviewKeyDown(object sender, KeyRoutedEventArgs e)
        {
            list.UpdateLayout();

            switch (e.Key)
            {
                case VirtualKey.Down:
                case VirtualKey.GamepadDPadDown:
                case VirtualKey.GamepadLeftThumbstickDown:
                    //Stores all gridviews(one row enabled)
                    if (listRivers.Count == 0)
                        listRivers = TreeHelper.FindVisualChildren<GridView>(list);
                    //Stores the selected index item of each river
                    if (listIndexsInEachRiver == null || listIndexsInEachRiver.Count == 0)
                    {
                        listIndexsInEachRiver = new List<int>();
                        foreach (var item in listRivers)
                        {
                            listIndexsInEachRiver.Add(item.SelectedIndex);
                        }
                    }

                    if (list != null && list.Items.Count > 0)
                    {
                        //Find the first river, including a textblock and a adaptive gridview
                        var firstRiver = list.ContainerFromIndex(0) as ListViewItem;
                        var gridview = TreeHelper.FindVisualChild<GridView>(firstRiver);
                        if (gridview != null && gridview.Items.Count > 0)
                        {
                            GridViewItem item = new GridViewItem();
                            if (listIndexsInEachRiver[0] == -1)
                            {
                                item = gridview.ContainerFromIndex(0) as GridViewItem;
                                listIndexsInEachRiver[0] = 0;
                            }
                            else
                            {
                                item = gridview.ContainerFromIndex(listIndexsInEachRiver[0]) as GridViewItem;
                                listIndexsInEachRiver[0] = gridview.SelectedIndex;
                            }

                            item.Focus(FocusState.Programmatic);
                            item.IsSelected = true;
                            e.Handled = true;
                        }
                    }

                    e.Handled = true;
                    break;
                case VirtualKey.Up:
                case VirtualKey.GamepadDPadUp:
                case VirtualKey.GamepadLeftThumbstickUp:
                    //Do nothing

                    e.Handled = true;
                    break;
                default:
                    break;
            }
        }
        private void InitMoreInfoContentContainer(GridViewItem container)
        {
            if (MoreInfoContent == null)
            {
                return;
            }

            var point = container.TransformToVisual(this).TransformPoint(new Windows.Foundation.Point(0, 0));
            var x     = point.X - ((MoreInfoContent.Width - container.ActualWidth) / 2);
            var y     = point.Y - ((MoreInfoContent.Height - container.ActualHeight) / 2);

            x = Math.Max(x, 10);
            x = Math.Min(x, ActualWidth - MoreInfoContent.Width - 10);

            y = Math.Max(y, 10);
            y = Math.Min(y, ActualHeight - MoreInfoContent.Height - 10);

            Canvas.SetLeft(MoreInfoContent, x);
            Canvas.SetTop(MoreInfoContent, y);

            var centerX = (point.X + (container.ActualWidth / 2)) - x;
            var centerY = (point.Y + (container.ActualHeight / 2)) - y;

            VisualExtensions.SetCenterPoint(MoreInfoContent, new Vector3((float)centerX, (float)centerY, 0).ToString());
        }
Exemplo n.º 16
0
        private void ucitajRaspored(object obj)
        {
            GridView gridViewRaspored = (GridView)obj;
            double   sirina_celije    = 50;
            double   visina_celije    = 50;
            int      broj_redova      = raspored.raspored.GetUpperBound(0) + 1;
            int      broj_kolona      = raspored.raspored.GetUpperBound(1) + 1;

            gridViewRaspored.Width = sirina_celije * (broj_redova) + 40;

            for (int i = 0; i < broj_redova; i++)
            {
                for (int j = 0; j < broj_kolona; j++)
                {
                    GridViewItem gvItem = new GridViewItem();
                    gvItem.Width  = sirina_celije;
                    gvItem.Height = visina_celije;

                    if (raspored.raspored[i, j])
                    {
                        gvItem.Background = new SolidColorBrush(Colors.Red);
                    }
                    else
                    {
                        gvItem.Background = new SolidColorBrush(Colors.LightGreen);
                    }
                    gvItem.Content = i * 10 + j;
                    gridViewRaspored.Items.Add(gvItem);
                }
            }
        }
Exemplo n.º 17
0
        /// <summary>
        /// 將媒體櫃放入分鏡腳本
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private async void MediaScriptList_Drop(object sender, DragEventArgs e)
        {
            var guid = await e.Data.GetView().GetTextAsync("MediaDataGuid");

            Media      media      = this.ViewModel.GridViewMediaCabinetList.FirstOrDefault(i => i.Guid.ToString() == guid);
            StoryBoard storyBoard = new StoryBoard(media);

            if (!this.ViewModel.GridViewStoryBoardScriptDataList.Any())
            {
                this.ViewModel.InsertStoryBoardIntoScript(0, storyBoard.MediaSource);
                return;
            }

            var gridView = ((GridView)sender);

            //Find the position where item will be dropped in the gridview
            Point pos = e.GetPosition(gridView.ItemsPanelRoot);

            //Get the size of one of the list items
            GridViewItem gvi        = (GridViewItem)gridView.ContainerFromIndex(0);
            double       itemHeight = gvi.ActualWidth + gvi.Margin.Left + gvi.Margin.Right;

            //Determine the index of the item from the item position (assumed all items are the same size)
            int index = Math.Min(gridView.Items.Count - 1, (int)(pos.X / itemHeight));

            this.ViewModel.InsertStoryBoardIntoScript(index, storyBoard.MediaSource);
        }
Exemplo n.º 18
0
        private async void GridViewPages_Loaded(object sender, RoutedEventArgs e)
        {
            await RunOnUIThreadAsync(CoreDispatcherPriority.High, () =>
            {
                if (GridViewPages.Items.Count >= 1)
                {
                    int index = ViewModel.SelectedPageIndex;

                    // fix GridView initially fails to select item by binding
                    GridViewPages.SelectedIndex = index;

                    // try scroll to selected item
                    try
                    {
                        GridViewItem item = (GridViewItem)GridViewPages.ContainerFromIndex(index);
                        Guard.IsNotNull(item, nameof(item));

                        BringIntoViewOptions options = new BringIntoViewOptions
                        {
                            AnimationDesired = false,
                        };
                        item.StartBringIntoView(options);
                    }
                    catch (Exception exc)
                    {
                        ViewModel.AppCenterService.TrackError(exc);
                    }
                }
            });
        }
        public void VerifyDataContextOfDirectChildOfGridViewItemWithNullDataContext()
        {
            var gridViewItem = new GridViewItem();

            AutomationProperties.SetName(gridViewItem, "Windows.UI.Xaml.Controls.Button");
            var content = new Button()
            {
                DataContext = new Button()
            };

            gridViewItem.Content     = content;
            gridViewItem.DataContext = null;

            App.Content = gridViewItem;

            var directChild = VisualTreeHelper.GetChild(gridViewItem, 0) as FrameworkElement;

            directChild.DataContext = null;
            directChild             = VisualTreeHelper.GetChild(directChild, 0) as FrameworkElement;
            directChild.DataContext = null;

            var peer = FrameworkElementAutomationPeer.CreatePeerForElement(gridViewItem);

            var rule = new ListItemNameNotEqualDataContextRule();

            Assert.IsTrue(rule.IsValid(gridViewItem, peer));
        }
Exemplo n.º 20
0
 //Method used when one of the events on the page is updating the table and query
 private void ItemBinding(DataView view)
 {
     //Sets the datasource of the webpage's Gridview to the TableBase object's returned Dataview from event methods.
     GridViewItem.DataSource = view;
     //Calls for the page to be updated and a postback
     GridViewItem.DataBind();
 }
Exemplo n.º 21
0
        private void GridViewItem_Tapped(object sender, TappedRoutedEventArgs e)
        {
            GridViewItem g = (GridViewItem)sender;

            //Debug.WriteLine("TAG: " + g.Tag);
            this.Frame.Navigate(typeof(ArduinoPage), g.Tag);
        }
Exemplo n.º 22
0
        private void faceGridView_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (e.AddedItems != null && e.AddedItems.Any())
            {
                GridViewItem gridViewFaceItem = faceGridView.ContainerFromItem(e.AddedItems[0]) as GridViewItem;
                gridViewFaceItem.Background         = new SolidColorBrush(Windows.UI.Colors.Black);
                gridViewFaceItem.Background.Opacity = 0.40;

                //Show the image preview
                thisFace = e.AddedItems.First() as Face;
                FaceImagePreview.Source = thisFace.Image;
                if (thisFace.IsDefault)
                {
                    SetDefaultButton.IsEnabled = false;
                }
                else
                {
                    SetDefaultButton.IsEnabled = true;
                }
            }

            if (e.RemovedItems != null && e.RemovedItems.Any())
            {
                GridViewItem gridViewFaceItem = faceGridView.ContainerFromItem(e.RemovedItems[0]) as GridViewItem;
                gridViewFaceItem.Background = new SolidColorBrush(Windows.UI.Colors.Transparent);
            }
        }
 public void RestoreFocus()
 {
     if (focusedItem != null)
     {
         focusedItem.Focus(FocusState.Keyboard);
         focusedItem = null;
     }
 }
        private void bindItem()
        {
            string sql = "select * from TBQM_APLYFORITEM where CONTID='" + hfditem.Value + "'";

            System.Data.DataTable dt = DBCallCommon.GetDTUsingSqlText(sql);
            GridViewItem.DataSource = dt;
            GridViewItem.DataBind();
        }
Exemplo n.º 25
0
        private void AdaptiveGridViewControl_ItemClick(object sender, ItemClickEventArgs e)
        {
            var          data          = ((InstaBroadcast)e.ClickedItem);
            GridViewItem itemAnimation = (GridViewItem)AdaptiveGridViewControl.ContainerFromItem(data);

            ConnectedAnimationService.GetForCurrentView().PrepareToAnimate("Poster", itemAnimation);
            MainPage.MainFrame.Navigate(typeof(StoryViewLive), data);
        }
Exemplo n.º 26
0
 public void MapBook(GridViewItem item, Book book)
 {
     item.ID             = book.ID;
     item.Author         = book.Author;
     item.Name           = book.Name;
     item.Publisher      = book.Publisher;
     item.DatePublishing = book.DatePublishing;
 }
Exemplo n.º 27
0
        private void Bosses_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            GridView     item     = (sender as GridView);
            GridViewItem gvitem   = item.ContainerFromItem(item.SelectedItem) as GridViewItem;
            CheckBox     CheckBox = FindControlHelper.FindChildControl <CheckBox>(gvitem, typeof(CheckBox), "BossSwitch");

            CheckBox?.Focus(FocusState.Programmatic);
        }
Exemplo n.º 28
0
        private void StyledGrid_ChangeCol(object sender, TextChangedEventArgs e)
        {
            try
            {
                // Make sure that value entered is a number
                int newVal = Convert.ToInt32(ColSpace.Text.ToString());

                // If empty or negative string, reset to 0.
                if (ColSpace.Text.ToString() != "" && newVal >= 0)
                {
                    ColSpacesDec.IsEnabled = true;

                    ColSpace.Text            = ColSpace.Text.ToString();
                    ColSpace.PlaceholderText = ColSpace.Text.ToString();

                    // Create new Thickness object and update relevant parts of Margin property (top/bottom)
                    for (int i = 0; i < StyledGrid.Items.Count; i++)
                    {
                        GridViewItem item = StyledGrid.ContainerFromIndex(i) as GridViewItem;

                        Thickness NewMargin = item.Margin;
                        NewMargin.Left  = Convert.ToInt32(ColSpace.Text);
                        NewMargin.Right = Convert.ToInt32(ColSpace.Text);

                        item.Margin = NewMargin;
                    }
                }
                else
                {
                    ColSpace.Text            = "";
                    ColSpace.PlaceholderText = "";
                }
            }

            // If entered value not a number, reset to 0.
            catch (FormatException)
            {
                // If clearing a text entry, reset margins to 0.
                if (ColSpace.Text == "")
                {
                    for (int i = 0; i < StyledGrid.Items.Count; i++)
                    {
                        GridViewItem item = StyledGrid.ContainerFromIndex(i) as GridViewItem;

                        Thickness NewMargin = item.Margin;
                        NewMargin.Left  = 0;
                        NewMargin.Right = 0;

                        item.Margin = NewMargin;
                    }

                    ColSpacesDec.IsEnabled = false;
                }

                ColSpace.Text            = "";
                ColSpace.PlaceholderText = "0";
            }
        }
Exemplo n.º 29
0
        private void StoriesList_ItemClick(object sender, ItemClickEventArgs e)
        {
            var          item          = ((InstaReelFeed)e.ClickedItem);
            GridViewItem itemAnimation = (GridViewItem)StoriesList.ContainerFromItem(item);

            itemList = itemAnimation;
            ConnectedAnimationService.GetForCurrentView().PrepareToAnimate("image", itemAnimation);
            StoryFr.Navigate(typeof(StoryView.StoryViews), item);
        }
Exemplo n.º 30
0
 private void selectAll_Unchecked(object sender, RoutedEventArgs e)
 {
     gridview.Items.ToList().ForEach(item =>
     {
         GridViewItem gi = gridview.ContainerFromItem(item) as GridViewItem;
         var cb          = (gi.ContentTemplateRoot as Grid).FindName("ItemSelectCB") as CheckBox;
         cb.IsChecked    = false;
     });
 }