我需要执行以下代码:
<UserControl x:Class="MyApp.Views.UserControls.UCMainControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxnav="http://schemas.devexpress.com/winfx/2008/xaml/navigation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Controls="clr-namespace:MyApp.Views.UserControls">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="140"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition/>
<ColumnDefinition Width="220"/>
</Grid.ColumnDefinitions>
<Controls:UCMenuPrincipal x:Name="MenuPrincipalcontrol" Grid.Row="0"/>
</Grid>
在这段代码中,我需要在另一个 UserControl 上放置一个菜单,但该菜单位于不同的 UserControl 中(但是,它可以是任何东西)。
当代码在正常的 WPF 中时,我可以做到。Avalonia 可以做到这一点吗?