When WPF using WindowsXamlHost the WindowsXamlHost.Clip can not work ,can we made it work?
WPF:
<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:local="clr-namespace:WpfApp1"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="MainWindow"
``xmlns:xhost="clr-namespace:Microsoft.Toolkit.Wpf.UI.XamlHost;assembly=Microsoft.Toolkit.Wpf.UI.XamlHost"
Width="800"
Height="450"
mc:Ignorable="d">
<Grid >
<xhost:WindowsXamlHost Width="400" Height="200" RenderTransformOrigin="0.5,0.5">
<xhost:WindowsXamlHost.Clip>
<GeometryGroup>
<RectangleGeometry>
<RectangleGeometry.Rect>
<Rect Width="100" Height="100" ></Rect>
</RectangleGeometry.Rect>
</RectangleGeometry>
</GeometryGroup>
</xhost:WindowsXamlHost.Clip>
</xhost:WindowsXamlHost>
</Grid>
</Window>