Files
cefsharp/CefSharp.Wpf.Example/ChangeParentWindow.xaml
Alex Maitland 137a4bbe6f WPF - Update CleanupElement when PresentationSource changes
- If the CleanupElement is a Window then move it to the new Window
2022-01-15 11:20:07 +10:00

25 lines
1.2 KiB
XML

<Window x:Class="CefSharp.Wpf.Example.ChangeParentWindow"
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"
mc:Ignorable="d"
Title="ChangeParentWindow" Height="600" Width="800" WindowStartupLocation="CenterScreen" WindowState="Maximized">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Grid.ColumnSpan="2">
<Button Content="Open browser in new Window" Click="OnAddBrowser" />
<Button Content="Re-Parent Browser and Close Window" Click="OnRemoveBrowser" />
</StackPanel>
<Border Grid.Row="1" Grid.Column="0" x:Name="StaticBrowser" />
<Border Grid.Row="1" x:Name="BrowserSite" Grid.Column="1" />
</Grid>
</Window>