The name does not exist in the namespace in WPF application
问题 Creating a WPF application, using VS2017. I have an enum like: namespace Sample.Common { public enum SmPageTypes { Type1 = 0, Type2 = 1 } } I'm trying to use it in xaml form, but get an error: The name "SmPageTypes" does not exist in the namespace "clr-Sample.Common;assembly=Sample". Here is xaml code adding namespace: xmlns:CommonAlias="clr-namespace:Sample.Common;assembly=Sample" and add enum as resource: <Window.Resources> <ObjectDataProvider x:Key="dataFromEnum" MethodName="GetValues"