Пример #1
0
 public RelativeSource(RelativeSourceMode mode, Type type, int level) : this(NoesisGUI_PINVOKE.new_RelativeSource__SWIG_2((int)mode, new HandleRef(type, (type != null ? Noesis.Extend.GetNativeType(type) : IntPtr.Zero)), level), true)
 {
     if (NoesisGUI_PINVOKE.SWIGPendingException.Pending)
     {
         throw NoesisGUI_PINVOKE.SWIGPendingException.Retrieve();
     }
 }
Пример #2
0
 public RelativeSource(RelativeSourceMode mode) : this(NoesisGUI_PINVOKE.new_RelativeSource__SWIG_1((int)mode), true)
 {
     if (NoesisGUI_PINVOKE.SWIGPendingException.Pending)
     {
         throw NoesisGUI_PINVOKE.SWIGPendingException.Retrieve();
     }
 }
Пример #3
0
 /// <summary>
 /// Initializes a new BindingInfo with a path, a source binding RelativeSourceMode, and an optional converter. 
 /// </summary>
 /// <param name="path">The path to the source member.</param>
 /// <param name="bindingMode">The binding direction.</param>
 /// <param name="relativeSourceMode">The source RelativeSourceMode.</param>
 /// <param name="converterType">An optional converter.</param>
 /// <param name="converterParameter">An optional converter parameter.</param>
 internal BindingInfo(string path, BindingMode bindingMode, RelativeSourceMode relativeSourceMode, Type converterType = null,
     object converterParameter = null)
 {
     Path = path;
     RelativeSourceMode = relativeSourceMode;
     ConverterType = converterType;
     ConverterParameter = converterParameter;
 }
Пример #4
0
 /// <summary>
 /// Initializes a new BindingInfo with a path, a source binding RelativeSourceMode, and an optional converter.
 /// </summary>
 /// <param name="path">The path to the source member.</param>
 /// <param name="bindingMode">The binding direction.</param>
 /// <param name="relativeSourceMode">The source RelativeSourceMode.</param>
 /// <param name="converterType">An optional converter.</param>
 /// <param name="converterParameter">An optional converter parameter.</param>
 internal BindingInfo(string path, BindingMode bindingMode, RelativeSourceMode relativeSourceMode, Type converterType = null,
                      object converterParameter = null)
 {
     Path = path;
     RelativeSourceMode = relativeSourceMode;
     ConverterType      = converterType;
     ConverterParameter = converterParameter;
 }
Пример #5
0
     public RelativeSource(RelativeSourceMode mode) : this(NoesisGUI_PINVOKE.new_RelativeSource__SWIG_1((int)mode), true)
     {
 #if UNITY_EDITOR || NOESIS_API
         if (NoesisGUI_PINVOKE.SWIGPendingException.Pending)
         {
             throw NoesisGUI_PINVOKE.SWIGPendingException.Retrieve();
         }
 #endif
     }
Пример #6
0
 // Token: 0x06001CAC RID: 7340 RVA: 0x00086628 File Offset: 0x00084828
 private void InitializeMode(RelativeSourceMode mode)
 {
     if (mode == RelativeSourceMode.FindAncestor)
     {
         this._ancestorLevel = 1;
         this._mode          = mode;
         return;
     }
     if (mode == RelativeSourceMode.PreviousData || mode == RelativeSourceMode.Self || mode == RelativeSourceMode.TemplatedParent)
     {
         this._ancestorLevel = 0;
         this._mode          = mode;
         return;
     }
     throw new ArgumentException(SR.Get("RelativeSourceModeInvalid"), "mode");
 }
Пример #7
0
        void InitializeMode(RelativeSourceMode mode)
        {
            Debug.Assert(IsUninitialized);

            if (mode == RelativeSourceMode.FindAncestor)
            {
                // default level
                _ancestorLevel = 1;
                _mode          = mode;
            }
            else if (mode == RelativeSourceMode.PreviousData ||
                     mode == RelativeSourceMode.Self ||
                     mode == RelativeSourceMode.TemplatedParent)
            {
                _ancestorLevel = 0;
                _mode          = mode;
            }
            else
            {
                throw new ArgumentException(SR.Get(SRID.RelativeSourceModeInvalid), "mode");
            }
        }
        // Token: 0x060075FF RID: 30207 RVA: 0x0021A65C File Offset: 0x0021885C
        public override string ToString()
        {
            RelativeSourceMode mode = this._relativeSource.Mode;
            string             result;

            if (mode == RelativeSourceMode.FindAncestor)
            {
                result = string.Format(CultureInfo.InvariantCulture, "RelativeSource {0}, AncestorType='{1}', AncestorLevel='{2}'", new object[]
                {
                    this._relativeSource.Mode,
                    this._relativeSource.AncestorType,
                    this._relativeSource.AncestorLevel
                });
            }
            else
            {
                result = string.Format(CultureInfo.InvariantCulture, "RelativeSource {0}", new object[]
                {
                    this._relativeSource.Mode
                });
            }
            return(result);
        }
Пример #9
0
        void InitializeMode(RelativeSourceMode mode)
        { 
            Debug.Assert(IsUninitialized); 

            if (mode == RelativeSourceMode.FindAncestor) 
            {
                // default level
                _ancestorLevel = 1;
                _mode = mode; 
            }
            else if (mode == RelativeSourceMode.PreviousData 
                || mode == RelativeSourceMode.Self 
                || mode == RelativeSourceMode.TemplatedParent)
            { 
                _ancestorLevel = 0;
                _mode = mode;
            }
            else 
            {
                throw new ArgumentException(SR.Get(SRID.RelativeSourceModeInvalid), "mode"); 
            } 
        }
Пример #10
0
 public RelativeSource(RelativeSourceMode mode)
 {
   _mode = mode;
 }
 public RelativeSource(RelativeSourceMode mode)
 {
 }
 public RelativeSource(RelativeSourceMode mode, Type ancestorType, int ancestorLevel)
 {
 }
Пример #13
0
 public RelativeSourceExtension(RelativeSourceMode mode)
 {
     Mode = mode;
 }
Пример #14
0
 public RelativeSource(RelativeSourceMode mode, Type type, int level) : this(NoesisGUI_PINVOKE.new_RelativeSource__SWIG_2((int)mode, type != null ? Noesis.Extend.EnsureNativeType(type) : IntPtr.Zero, level), true)
 {
 }
Пример #15
0
 /// <summary>Initializes a new instance of the <see cref="T:System.Windows.Data.RelativeSource" /> class with an initial mode.</summary>
 /// <param name="mode">One of the <see cref="T:System.Windows.Data.RelativeSourceMode" /> values.</param>
 // Token: 0x06001C9B RID: 7323 RVA: 0x00086458 File Offset: 0x00084658
 public RelativeSource(RelativeSourceMode mode)
 {
     this.InitializeMode(mode);
 }
 public RelativeSource(RelativeSourceMode mode)
 {
 }
Пример #17
0
 /// <summary>Initializes a new instance of the <see cref="T:System.Windows.Data.RelativeSource" /> class with an initial mode and additional tree-walking qualifiers for finding the desired relative source.</summary>
 /// <param name="mode">One of the <see cref="T:System.Windows.Data.RelativeSourceMode" /> values. For this signature to be relevant, this should be <see cref="F:System.Windows.Data.RelativeSourceMode.FindAncestor" />.</param>
 /// <param name="ancestorType">The <see cref="T:System.Type" /> of ancestor to look for.</param>
 /// <param name="ancestorLevel">The ordinal position of the desired ancestor among all ancestors of the given type. </param>
 // Token: 0x06001C9C RID: 7324 RVA: 0x0008646E File Offset: 0x0008466E
 public RelativeSource(RelativeSourceMode mode, Type ancestorType, int ancestorLevel)
 {
     this.InitializeMode(mode);
     this.AncestorType  = ancestorType;
     this.AncestorLevel = ancestorLevel;
 }
Пример #18
0
 public void SetRelative(RelativeSourceMode mode, DependencyProperty property)
 {
     this.RelativeSource = new RelativeSource(mode);
     this.Path           = new PropertyPath(property);
 }
Пример #19
0
 public RelativeSource(RelativeSourceMode mode, Type type, int level) : this(NoesisGUI_PINVOKE.new_RelativeSource__SWIG_2((int)mode, new HandleRef(type, (type != null ? Noesis.Extend.GetNativeType(type) : IntPtr.Zero)), level), true)
 {
 }
Пример #20
0
 public RelativeSource(RelativeSourceMode mode) : this(NoesisGUI_PINVOKE.new_RelativeSource__SWIG_1((int)mode), true)
 {
 }
Пример #21
0
 /// <summary>Constructor 
 /// </summary>
 public RelativeSource(RelativeSourceMode mode) 
 {
     InitializeMode(mode);
 }
Пример #22
0
 /// <summary>Constructor for FindAncestor mode
 /// </summary> 
 public RelativeSource(RelativeSourceMode mode, Type ancestorType, int ancestorLevel) 
 {
     InitializeMode(mode); 
     AncestorType = ancestorType;
     AncestorLevel = ancestorLevel;
 }
Пример #23
0
 /// <summary>
 /// Initializes a new instance of the RelativeSource class by using provided relative source mode.
 /// </summary>
 /// <param name="relativeSourceMode">The relative source mode</param>
 public RelativeSource(RelativeSourceMode relativeSourceMode)
 {
     _mode = relativeSourceMode;
 }
Пример #24
0
 public RelativeSource(RelativeSourceMode mode)
 {
     this.Mode = mode;
 }
Пример #25
0
 public RelativeSource(RelativeSourceMode mode)
 {
     this.Mode = mode;
 }
 public RelativeSource(RelativeSourceMode mode, Type ancestorType, int ancestorLevel)
 {
 }
Пример #27
0
        public static RelativeSourceMode Unbox_RelativeSourceMode(IntPtr val)
        {
            RelativeSourceMode ret = (RelativeSourceMode)NoesisGUI_PINVOKE.Unbox_RelativeSourceMode(val);

            return(ret);
        }
Пример #28
0
 public RelativeSourceExtension(RelativeSourceMode mode)
 {
     Mode = mode;
 }
Пример #29
0
        public static IntPtr Box_RelativeSourceMode(RelativeSourceMode val)
        {
            IntPtr ret = NoesisGUI_PINVOKE.Box_RelativeSourceMode((int)val);

            return(ret);
        }
Пример #30
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RelativeSource"/> class.
 /// </summary>
 /// <param name="mode">The relative source mode.</param>
 public RelativeSource(RelativeSourceMode mode)
 {
     Mode = mode;
 }
Пример #31
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="Value"></param>
 /// <param name="Property"></param>
 /// <param name="Path"></param>
 /// <param name="RelativeSourceMode"></param>
 /// <param name="Mode"></param>
 /// <returns></returns>
 public static BindingExpressionBase Bind(this DependencyObject Value, DependencyProperty Property, string Path, RelativeSourceMode RelativeSourceMode = RelativeSourceMode.Self, BindingMode Mode = BindingMode.OneWay, UpdateSourceTrigger UpdateSourceTrigger = UpdateSourceTrigger.Default)
 {
     return(BindingOperations.SetBinding(Value, Property, new Binding()
     {
         RelativeSource = new RelativeSource(RelativeSourceMode),
         Path = new PropertyPath(Path),
         Mode = Mode
     }));
 }