Exemplo n.º 1
0
        private static void SetValue(object sender, XamlSetValueEventArgs e)
        {
            BindingBase binding = e.Value as BindingBase;

            if (binding != null)
            {
                DependencyProperty dp = DependencyObject.GetPropertyFromName(
                    e.Member.DeclaringType.UnderlyingType, 
                    e.Member.Name);
                ((FrameworkElement)sender).SetBinding(dp, binding);
                e.Handled = true;
            }
        }
Exemplo n.º 2
0
        private static void SetValue(object sender, XamlSetValueEventArgs e)
        {
            //BindingBase binding = e.Value as BindingBase;

            //if (binding != null)
            //{
            //    int i = 0;
                //DependencyProperty dp =
                //    DependencyObject.GetPropertyFromName
                //    (
                //        e.Member.DeclaringType.UnderlyingType,
                //        e.Member.Name
                //    );
                //((FrameworkElement)sender).SetBinding(dp, binding);
                //e.Handled = true;
            //}
        }
 protected virtual bool OnSetValue(object eventSender, XamlMember member, object value)
 {
     if (this._xamlSetValueHandler != null)
     {
         XamlSetValueEventArgs e = new XamlSetValueEventArgs(member, value);
         this._xamlSetValueHandler(eventSender, e);
         return e.Handled;
     }
     return false;
 }
Exemplo n.º 4
0
		protected internal virtual bool OnSetValue (object eventSender, XamlMember member, object value)
		{
			if (settings.XamlSetValueHandler != null) {
				var args = new XamlSetValueEventArgs (member, value);
				settings.XamlSetValueHandler (eventSender, args);
				return args.Handled;
			}
			return false;
		}
Exemplo n.º 5
0
 private static void SetValue(object sender, XamlSetValueEventArgs e)
 {
     e.Member.Invoker.SetValue(sender, e.Value);
 }