Search code examples
xamlwin-universal-app

Edge-like tab bar in XAML for universal app


Is there a good way to achieve similar dynamic tab in XAML like in Edge browser where tabs are added dynamically? I know that the Pivot can be used for static tabs. More specifically, I need a solution that accounts for situation when there are too many tabs.


Solution

  • An Hoa,

    Follow these,

    1. Create a grid with two row definitions.
    2. First row definition is to create controls like enter image description here

    3. Second row definition is to create a empty layout.

    4. In the first row definition, create a stack panel and add a grid inside it with textblock to display the website name for ex.
    5. Create a + button.
    6. On click of + button, create a same grid with text block and add the control as child element to the stack panel which is present inside the first row definition.
    7. Follow the same for empty layout also which is present in the second row definition.