0

I am developing a UWP app and I have to make a control like in the People app for Windows 10.

I am currently trying this

 <StackPanel x:Name="stp">
            <Button Content="Button 1" x:Name="btnAction1">
                <Button.Flyout>
                    <MenuFlyout>
                        <MenuFlyoutItem Text="Action 1" Click="MenuFlyoutItem_Click">
                        </MenuFlyoutItem>

                    </MenuFlyout>
                </Button.Flyout>
            </Button>
        </StackPanel>

and in c#

 private void MenuFlyoutItem_Click(object sender, RoutedEventArgs e)
    {
        btnAction1.Margin = new Thickness(0, 10, 0, 0);
        stp.Children.Add(new TextBox() { Name = "newTxtBox", Text="Tushar"});
    }

But this will end up handling UI too much with no animation at all. I want to give an option to the user to remove this dynamically created control.

After that I would want something like this:Dynamically adding textboxes with animation and option to close

Can anybody please help? Thanks in advance.

tushargoyal1309
  • 175
  • 1
  • 14
  • Hi and welcome to SO. You might want to review the [help section](http://stackoverflow.com/help/dont-ask) on how a question might be better formed to solicit a helpful response. As it currently sits your question is pretty broad and seems to basically ask for someone to do your work for you. Cheers :) – Chris W. Apr 13 '17 at 16:45

1 Answers1

0

Check the documentation of Flyout and use the LightDismissOverlayMode property to suit your scenario. If any particular UI specific implementation required, post a screenshot.

Chirag Shah
  • 981
  • 1
  • 6
  • 12