Beispiel #1
0
 void CreateWrapper()
 {
     if (Instance is BindingBase)
     {
         wrapper = new BindingWrapper();
     }
     else if (Instance is StaticResourceExtension)
     {
         wrapper = new StaticResourceWrapper();
     }
     if (wrapper != null)
     {
         wrapper.XamlObject = this;
     }
 }
Beispiel #2
0
        void CreateWrapper()
        {
            if (Instance is BindingBase)
            {
                wrapper = new BindingWrapper(this);
            }
            else if (Instance is StaticResourceExtension)
            {
                wrapper = new StaticResourceWrapper(this);
            }

            if (wrapper == null && IsMarkupExtension)
            {
                var markupExtensionWrapperAttribute = Instance.GetType().GetCustomAttributes(typeof(MarkupExtensionWrapperAttribute), false).FirstOrDefault() as MarkupExtensionWrapperAttribute;
                if (markupExtensionWrapperAttribute != null)
                {
                    wrapper = MarkupExtensionWrapper.CreateWrapper(markupExtensionWrapperAttribute.MarkupExtensionWrapperType, this);
                }
                else
                {
                    wrapper = MarkupExtensionWrapper.TryCreateWrapper(Instance.GetType(), this);
                }
            }
        }
Beispiel #3
0
		void CreateWrapper()
		{
			if (Instance is BindingBase) {
				wrapper = new BindingWrapper();
			} else if (Instance is StaticResourceExtension) {
				wrapper = new StaticResourceWrapper();
			}
			if (wrapper != null) {
				wrapper.XamlObject = this;
			}
		}
Beispiel #4
0
		void CreateWrapper()
		{
			if (Instance is BindingBase) {
				wrapper = new BindingWrapper(this);
			} else if (Instance is StaticResourceExtension) {
				wrapper = new StaticResourceWrapper(this);
			}
			
			if (wrapper == null && IsMarkupExtension) {
				var markupExtensionWrapperAttribute = Instance.GetType().GetCustomAttributes(typeof(MarkupExtensionWrapperAttribute), false).FirstOrDefault() as MarkupExtensionWrapperAttribute;
				if(markupExtensionWrapperAttribute != null) {
					wrapper = MarkupExtensionWrapper.CreateWrapper(markupExtensionWrapperAttribute.MarkupExtensionWrapperType, this);
				}
				else {
					wrapper = MarkupExtensionWrapper.TryCreateWrapper(Instance.GetType(), this);
				}
			}
		}