Type x:String not found
Jassim Al Rahma
1,526
Reputation points
Hi,
Why I am getting below error in MAUI?
Here is my code:
<?xml version = "1.0" encoding = "UTF-8" ?>
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:Ansab"
x:Class="Ansab.App">
<Application.Resources>
<ResourceDictionary>
<x:String x:Key="CloseIconColorLight">#ff0000</x:String>
<x:String x:Key="CloseIconColorDark">#FFFF00</x:String>
<x:String x:Key="ActionHeaderIconColorLight">#000080</x:String>
<x:String x:Key="ActionHeaderIconColorDark">#0000FF</x:String>
<x:String x:Key="IconShare"></x:String>
<x:String x:Key="IconClose"></x:String>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Resources/Styles/Colors.xaml" />
<ResourceDictionary Source="Resources/Styles/Styles.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
and this is the error:
Microsoft.Maui.Controls.Xaml.XamlParseException: Position 8:14. Type x:String not found in xmlns http://schemas.microsoft.com/winfx/2009/xaml