예제 #1
0
    private static bool FindPage(IFrameworkInputElement page, Workplace workplace)
    {
        var type = (IsThisViewCanBeUsedWithViewsSubsystemAttribute)page.GetType()
                   .GetCustomAttribute(typeof(IsThisViewCanBeUsedWithViewsSubsystemAttribute));

        return(type.Workplace == workplace);
    }
        private static string CreateCustomizablePropertyName(IFrameworkInputElement child, IFrameworkInputElement childElementContent)
        {
            if (child == null)
            {
                throw new ArgumentNullException("child");
            }
            if (childElementContent == null)
            {
                throw new ArgumentNullException("childElementContent");
            }

            var name = childElementContent.Name;

            if (string.IsNullOrEmpty(name))
            {
                throw new Exception("Property Name of FrameworkElement childElementContent should be defined when used method CreateCustomizablePropertyName.");
            }

            return(string.Format("{0}_{1}_{2}", child.Name, childElementContent.GetType().Name, name));
        }