Exemple #1
0
        DirectInboxUc GetDirectInboxUc(InstaDirectInboxThread thread)
        {
            var uc = new DirectInboxUc
            {
                Name              = (Rnd.Next(11111, 999999) + Rnd.Next(10000, 999999)).ToString(),
                Thread            = thread,
                IsRightTapEnabled = true,
                IsHoldingEnabled  = true
            };

            uc.RightTapped += UcRightTapped;
            uc.Holding     += UcHolding;
            var deleteMenuFlyoutItem = new MenuFlyoutItem
            {
                DataContext = thread,
                Text        = "Delete"
            };

            deleteMenuFlyoutItem.Click += DeleteMenuFlyoutItemClick;
            var mediaFlyout = new MenuFlyout
            {
                Items =
                {
                    deleteMenuFlyoutItem,
                }
            };

            uc.ContextFlyout = mediaFlyout;
            return(uc);
        }
Exemple #2
0
        DirectInboxUc GetDirectInboxUc(InstaDirectInboxThread thread)
        {
            var uc = new DirectInboxUc
            {
                Name              = (Rnd.Next(11111, 999999) + Rnd.Next(10000, 999999)).ToString(),
                Thread            = thread,
                IsRightTapEnabled = true,
                IsHoldingEnabled  = true
            };

            return(uc);
        }
Exemple #3
0
        DirectInboxUc GetDirectInboxUc(InstaDirectInboxThread thread)
        {
            var uc = new DirectInboxUc
            {
                Name              = (Rnd.Next(11111, 999999) + Rnd.Next(10000, 999999)).ToString(),
                Thread            = thread,
                IsRightTapEnabled = true,
                IsHoldingEnabled  = true
            };

            uc.RightTapped += UcRightTapped;
            uc.Holding     += UcHolding;
            //<FlyoutBase.AttachedFlyout>
            //    <MenuFlyout Placement="Top">
            //        <MenuFlyoutItem Text="Unsend Message"
            //                        DataContext="{Binding}"
            //                        Click="UnsendMessageFlyoutClick" />
            //        <MenuFlyoutItem Text="Copy Text"
            //                        DataContext="{Binding}"
            //                        Click="CopyTextFlyoutClick" />
            //    </MenuFlyout>
            //</FlyoutBase.AttachedFlyout>
            var deleteMenuFlyoutItem = new MenuFlyoutItem
            {
                DataContext = thread,
                Text        = "Delete"
            };

            deleteMenuFlyoutItem.Click += DeleteMenuFlyoutItemClick;
            var mediaFlyout = new MenuFlyout
            {
                Items =
                {
                    deleteMenuFlyoutItem,
                }
            };

            FlyoutBase.SetAttachedFlyout(uc, mediaFlyout);
            return(uc);
        }