public static string FrameworkId(this WindowsFramework framework)
        {
            var type        = typeof(WindowsFramework);
            var frameworkId = framework.ToString();
            var memInfo     = type.GetMember(frameworkId);

            if (memInfo.Length <= 0)
            {
                return(frameworkId);
            }
            var attrs = memInfo[0].GetCustomAttributes(typeof(FrameworkIdAttribute), false);

            return(attrs.Length > 0 ? ((FrameworkIdAttribute)attrs[0]).FrameworkId : frameworkId);
        }
        internal static SearchCriteria ForMenuBar(WindowsFramework framework)
        {
            var searchCriteria =
                new SearchCriteria(SearchConditionFactory.CreateForControlType(typeof(MenuBar), framework.ToString()));

            return(searchCriteria.NotIdentifiedByText("System Menu Bar"));
        }
 internal static SearchCriteria ForMenuBar(WindowsFramework framework)
 {
     var searchCriteria =
         new SearchCriteria(SearchConditionFactory.CreateForControlType(typeof (MenuBar), framework.ToString()));
     return searchCriteria.NotIdentifiedByText("System Menu Bar");
 }