private void Initialize()
 {
     RelativeSource = new RelativeSource(RelativeSourceMode.FindAncestor, typeof(MainWindow), 1);
     Path           = new System.Windows.PropertyPath("Busy");
     Converter      = new BoolNotConverter();
     Mode           = BindingMode.OneWay;
 }
示例#2
0
 public IsDesignBind()
 {
     RelativeSource = new RelativeSource()
     {
         Mode = RelativeSourceMode.Self
     };
     //Path = DesignerProperties.IsInDesignModeProperty;
     Path = new System.Windows.PropertyPath(DesignerProperties.IsInDesignModeProperty);
 }
        public override ExtendedValidationResult Validate(object dataItem, System.Windows.PropertyPath propertyPath, object newValue, System.Globalization.CultureInfo cultureInfo)
        {
            string strValue = newValue as string;

            if (strValue != null && strValue == "XXX")
            {
                return(ExtendedValidationResult.Error("The value may not be XXX"));
            }
            if (strValue != null && strValue == "YYY")
            {
                return(ExtendedValidationResult.Warning("The value should not be YYY, but if you insist..."));
            }
            return(ExtendedValidationResult.Valid);
        }
 public TemplateBinding(string propertyPath)
     : this()
 {
     Path = new System.Windows.PropertyPath(propertyPath);
 }
示例#5
0
 public static void SetTargetProperty(System.Windows.DependencyObject element, System.Windows.PropertyPath path)
 {
 }
 public SimpleBinding(string path) : this()
 {
     Path = new System.Windows.PropertyPath(path);
 }
		public TemplateBinding(string propertyPath)
			: this()
		{
			Path = new System.Windows.PropertyPath(propertyPath);
		}
示例#8
0
        public ColorBinding(string path)
        {
            Source = ThemeHelper.Instance;

            Path = new System.Windows.PropertyPath(path);
        }