I am trying to create my custom control, but I am still getting error: The name "CustomCircleControl" does not exist in the namespace "using:App8"
My app namespace is App8 and class CustomCircleControl exists in it. Errors appears in file Generic.xaml, but I do not understand why.
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App8">
<Style TargetType="local:CustomCircleControl"> -- This line is marked by visual studio as error (The name "CustomCircleControl" does not exist in the namespace), but intelisence knows class CustomCircleControl.
Thank you for any help :-)
You are declaring the namespace incorrectly.
The correct way to declare a namespace in XAML is the following:
xmlns:MyNamespace="clr-namespace:Your.Namespace.Here"
So in your case, it'll look like this:
xmlns:local="clr-namespace:App8"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.