C# MUI中的WPF Uri错误格式
我得到了这个配置用户控件C# MUI中的WPF Uri错误格式,c#,wpf,modern-ui,C#,Wpf,Modern Ui,我得到了这个配置用户控件 <UserControl x:Class="NeoClinic.MAS.ConfigurationsList" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://s
<UserControl x:Class="NeoClinic.MAS.ConfigurationsList"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mui="http://firstfloorsoftware.com/ModernUI"
mc:Ignorable="d"
>
<Grid Style="{StaticResource ContentRoot}">
<!-- TODO: set @SelectedSource -->
<mui:ModernTab x:Name="ModTab" Layout="List" PreviewMouseLeftButtonUp="ModTab_PreviewMouseLeftButtonUp" >
<mui:ModernTab.Links >
<!-- TODO: set @Source -->
<mui:Link x:Name="BreedLink" DisplayName="Breeds" Source="/Pages/BreedListV2.xaml" />
<mui:Link x:Name="SpecieLink" DisplayName="Species" Source="/Pages/SpeciesList.xaml" />
<mui:Link x:Name="SpecieDetails" DisplayName="Species Details" />
</mui:ModernTab.Links>
</mui:ModernTab>
</Grid>
</UserControl>
它说我有一个URI格式异常。我做错了什么
我想清除BreedListV2.xaml并用另一个UserCOntrol替换它,但这个URI格式异常使我无法这样做。这是一个
绝对
URI,而不是相对
绝对值
SpecieDetails.Source = new Uri("pack://application:,,,/BreedList.xaml", UriKind.Absolute);
SpecieDetails.Source = new Uri("/BreedList.xaml", UriKind.Relative);
相对的
SpecieDetails.Source = new Uri("pack://application:,,,/BreedList.xaml", UriKind.Absolute);
SpecieDetails.Source = new Uri("/BreedList.xaml", UriKind.Relative);
将上述代码设置为UriKind.Absolute应该可以正常工作检查这是否对您有帮助这仍然发生=(我甚至尝试了UriKind.Absolute或Relative,但仍然失败