Is it possible to have a 'Partialview' in WPF?

0

I wanted to know if it's possible to implement the concept of partialview in a WPF View. Something like a flap system, which changes the content of the grid but does not change the layout of the view. I just need to know how to make the contents of the child view be loaded inside the parent view.

    
asked by anonymous 18.07.2018 / 16:37

1 answer

1

As tab system in wpf there is the TabControl, where inside there can be n TabItem, which are the tabs themselves.

Ex:

<Window x:Class="WpfApp1.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:WpfApp1"
    mc:Ignorable="d"
    Title="MainWindow" Height="450" Width="800">
<Grid>
    <TabControl>
        <TabItem Header="Aba 1">

        </TabItem>

        <TabItem Header="Aba 2">

        </TabItem>

    </TabControl>
</Grid>

    
19.07.2018 / 21:42