• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# PropertyChangedCallback类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中PropertyChangedCallback的典型用法代码示例。如果您正苦于以下问题:C# PropertyChangedCallback类的具体用法?C# PropertyChangedCallback怎么用?C# PropertyChangedCallback使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PropertyChangedCallback类属于命名空间,在下文中一共展示了PropertyChangedCallback类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: FunctionalPropertyMetadata

 public FunctionalPropertyMetadata(object defaultValue, FunctionalPropertyMetadataOptions flags, PropertyChangedCallback propertyChangedCallback, CoerceValueCallback coerceValueCallback)
 {
     DefaultValue = defaultValue;
     PropertyChangedCallback = propertyChangedCallback;
     CoerceValueCallback = coerceValueCallback;
     _flags = flags;
 }
开发者ID:pedone,项目名称:Functional-Library,代码行数:7,代码来源:FunctionalPropertyMetadata.cs


示例2: PropertyMetadata

 public PropertyMetadata(MetadataOption options, PropertyChangedCallback propertyChangedCallback = null,
     CoerceValueCallback coerceValueCallback = null)
 {
     Options = options;
     PropertyChanged = propertyChangedCallback;
     CoerceValue = coerceValueCallback;
 }
开发者ID:Pyratron,项目名称:PyraUI,代码行数:7,代码来源:PropertyMetadata.cs


示例3: OnApply

 protected override void OnApply(DependencyProperty dp, Type targetType)
 {
     doType = DependencyObjectType.FromSystemType(targetType);
     propertyChangedCallbackInternal = PropertyChangedCallback;
     PropertyChangedCallback = OnPropertyChanged;
     base.OnApply(dp, targetType);
 }
开发者ID:xs2ranjeet,项目名称:13ns9-1spr,代码行数:7,代码来源:HandleChangesPropertyMetadata.cs


示例4: TextBox

        //------------------------------------------------------
        //
        //  Constructors
        //
        //------------------------------------------------------

        #region Constructors

        /// <summary>
        /// Static constructor for TextBox.
        /// </summary>
        static TextBox()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(TextBox), new FrameworkPropertyMetadata(typeof(TextBox)));
            _dType = DependencyObjectType.FromSystemTypeInternal(typeof(TextBox));

            // Add handlers for height properties so we can manage min/maxLines
            PropertyChangedCallback callback = new PropertyChangedCallback(OnMinMaxChanged);

            HeightProperty.OverrideMetadata(typeof(TextBox), new FrameworkPropertyMetadata(callback));
            MinHeightProperty.OverrideMetadata(typeof(TextBox), new FrameworkPropertyMetadata(callback));
            MaxHeightProperty.OverrideMetadata(typeof(TextBox), new FrameworkPropertyMetadata(callback));
            FontFamilyProperty.OverrideMetadata(typeof(TextBox), new FrameworkPropertyMetadata(callback));
            FontSizeProperty.OverrideMetadata(typeof(TextBox), new FrameworkPropertyMetadata(callback));

            // Registering typography properties metadata
            PropertyChangedCallback onTypographyChanged = new PropertyChangedCallback(OnTypographyChanged);
            DependencyProperty[] typographyProperties = Typography.TypographyPropertiesList;
            for (int i = 0; i < typographyProperties.Length; i++)
            {
                typographyProperties[i].OverrideMetadata(typeof(TextBox), new FrameworkPropertyMetadata(onTypographyChanged));
            }

            HorizontalScrollBarVisibilityProperty.OverrideMetadata(typeof(TextBox), new FrameworkPropertyMetadata(
             ScrollBarVisibility.Hidden,
             new PropertyChangedCallback(OnScrollViewerPropertyChanged), // PropertyChangedCallback
             new CoerceValueCallback(CoerceHorizontalScrollBarVisibility)));

        }
开发者ID:JianwenSun,项目名称:cc,代码行数:39,代码来源:TextBox.cs


示例5: FrameworkPropertyMetadata

 public FrameworkPropertyMetadata(
             PropertyChangedCallback propertyChangedCallback,
             CoerceValueCallback coerceValueCallback)
             : base(propertyChangedCallback)
 {
     this.CoerceValueCallback = coerceValueCallback;
 }
开发者ID:modulexcite,项目名称:Avalonia,代码行数:7,代码来源:FrameworkPropertyMetadata.cs


示例6: CornerRadiusAnimation

        static CornerRadiusAnimation()
        {
            Type typeofProp = typeof(CornerRadius?);
            Type typeofThis = typeof(CornerRadiusAnimation);
            PropertyChangedCallback propCallback = new PropertyChangedCallback(AnimationFunction_Changed);
            ValidateValueCallback validateCallback = new ValidateValueCallback(ValidateFromToOrByValue);

            FromProperty = DependencyProperty.Register(
                "From",
                typeofProp,
                typeofThis,
                new PropertyMetadata((CornerRadius?)null, propCallback),
                validateCallback);

            ToProperty = DependencyProperty.Register(
                "To",
                typeofProp,
                typeofThis,
                new PropertyMetadata((CornerRadius?)null, propCallback),
                validateCallback);

            ByProperty = DependencyProperty.Register(
                "By",
                typeofProp,
                typeofThis,
                new PropertyMetadata((CornerRadius?)null, propCallback),
                validateCallback);
        }
开发者ID:grandtiger,项目名称:wpf-shell,代码行数:28,代码来源:CornerRadiusAnimation.cs


示例7: ReadOnlyPropertyMetadata

 public ReadOnlyPropertyMetadata(object defaultValue, 
                                 GetReadOnlyValueCallback getValueCallback,
                                 PropertyChangedCallback propertyChangedCallback) :
                                 base(defaultValue, propertyChangedCallback)
 {
     _getValueCallback = getValueCallback;
 }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:7,代码来源:ReadOnlyPropertyMetadata.cs


示例8: PropertyMetadata

 public PropertyMetadata(object defaultValue = null, PropertyChangedCallback propertyChangedCallback = null, CoerceValueCallback coerceValueCallback = null, bool inherits = false)
 {
     this.DefaultValue = defaultValue;
     this.PropertyChangedCallback = propertyChangedCallback;
     this.CoerceValueCallback = coerceValueCallback;
     this.Inherits = inherits;
 }
开发者ID:highzion,项目名称:Granular,代码行数:7,代码来源:PropertyMetadata.cs


示例9: QuaternionAnimation

        /// <summary>
        /// Static ctor for QuaternionAnimation establishes
        /// dependency properties, using as much shared data as possible.
        /// </summary>
        static QuaternionAnimation()
        {
            Type typeofProp = typeof(Quaternion?);
            Type typeofThis = typeof(QuaternionAnimation);
            PropertyChangedCallback propCallback = new PropertyChangedCallback(AnimationFunction_Changed);
            ValidateValueCallback validateCallback = new ValidateValueCallback(ValidateFromToOrByValue);

            FromProperty = DependencyProperty.Register(
                "From",
                typeofProp,
                typeofThis,
                new PropertyMetadata((Quaternion?)null, propCallback),
                validateCallback);

            ToProperty = DependencyProperty.Register(
                "To",
                typeofProp,
                typeofThis,
                new PropertyMetadata((Quaternion?)null, propCallback),
                validateCallback);

            ByProperty = DependencyProperty.Register(
                "By",
                typeofProp,
                typeofThis,
                new PropertyMetadata((Quaternion?)null, propCallback),
                validateCallback);

            EasingFunctionProperty = DependencyProperty.Register(
                "EasingFunction",
                typeof(IEasingFunction),
                typeofThis);
        }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:37,代码来源:QuaternionAnimation.cs


示例10: UIPropertyMetadata

 public UIPropertyMetadata(
             object defaultValue,
             PropertyChangedCallback propertyChangedCallback,
             CoerceValueCallback coerceValueCallback)
             : base(defaultValue, propertyChangedCallback, coerceValueCallback)
 {
 }
开发者ID:modulexcite,项目名称:Avalonia,代码行数:7,代码来源:UIPropertyMetadata.cs


示例11: UIPropertyMetadata

 /// <summary>
 ///     UI metadata construction
 /// </summary>
 /// <param name="defaultValue">Default value of property</param>
 /// <param name="propertyChangedCallback">Called when the property has been changed</param>
 /// <param name="coerceValueCallback">Called on update of value</param>
 /// <param name="isAnimationProhibited">Should animation be prohibited?</param>
 public UIPropertyMetadata(object defaultValue,
                         PropertyChangedCallback propertyChangedCallback,
                         CoerceValueCallback coerceValueCallback,
                         bool isAnimationProhibited) :
     base(defaultValue, propertyChangedCallback, coerceValueCallback)
 {
     WriteFlag(MetadataFlags.UI_IsAnimationProhibitedID, isAnimationProhibited);
 }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:15,代码来源:UIPropertyMetadata.cs


示例12: RegisterForNotification

 public static void RegisterForNotification(string property, FrameworkElement frameworkElement, PropertyChangedCallback OnCallBack)
 {
     Binding binding2 = new Binding(property);
     binding2.set_Source(frameworkElement);
     Binding binding = binding2;
     DependencyProperty property2 = DependencyProperty.RegisterAttached("ListenAttached" + property, typeof(object), typeof(UserControl), new PropertyMetadata(OnCallBack));
     frameworkElement.SetBinding(property2, binding);
 }
开发者ID:belsoft,项目名称:traingraph,代码行数:8,代码来源:Helper.cs


示例13: UIPropertyMetadata

		public UIPropertyMetadata (object defaultValue,
					   PropertyChangedCallback propertyChangedCallback,
					   CoerceValueCallback coerceValueCallback,
					   bool isAnimationProhibited)
			: base (defaultValue, propertyChangedCallback, coerceValueCallback)
		{
			this.isAnimationProhibited = false;
		}
开发者ID:alesliehughes,项目名称:olive,代码行数:8,代码来源:UIPropertyMetadata.cs


示例14: PropertyMetadata

 /// <summary> 
 ///     Type meta construction
 /// </summary>
 /// <param name="defaultValue">Default value of property</param>
 /// <param name="propertyChangedCallback">Called when the property has been changed</param> 
 /// <param name="coerceValueCallback">Called on update of value</param>
 public PropertyMetadata(object defaultValue, 
                         PropertyChangedCallback propertyChangedCallback, 
                         CoerceValueCallback coerceValueCallback)
 { 
     DefaultValue = defaultValue;
     PropertyChangedCallback = propertyChangedCallback;
     CoerceValueCallback = coerceValueCallback;
 } 
开发者ID:sjyanxin,项目名称:WPFSource,代码行数:14,代码来源:PropertyMetadata.cs


示例15: PropertyMetadata

        public PropertyMetadata(object defaultValue, PropertyChangedCallback propertyChangedCallback)
        {
            if (defaultValue == DependencyProperty.UnsetValue)
                throw new ArgumentException("Cannot initialize property metadata's default value to 'Unset'");

            DefaultValue = defaultValue;
            PropertyChangedCallback = propertyChangedCallback;
        }
开发者ID:tfreitasleal,项目名称:MvvmFx,代码行数:8,代码来源:DependencyProperty.cs


示例16: StylizedTextBlock

 static StylizedTextBlock()
 {
     var metadata = TextProperty.GetMetadata(typeof(TextBlock));
     _originalTtextPropertyChangedCallback = metadata.PropertyChangedCallback;
     var originalCoerceValueCallback = metadata.CoerceValueCallback;
     TextProperty.OverrideMetadata(typeof(StylizedTextBlock), new FrameworkPropertyMetadata(string.Empty,
         FrameworkPropertyMetadataOptions.AffectsMeasure | FrameworkPropertyMetadataOptions.AffectsRender,
         OnTextChanged, originalCoerceValueCallback));
 }
开发者ID:Alexey1,项目名称:JoinToPlayClient,代码行数:9,代码来源:StylizedTextBlock.cs


示例17: FontPropertyMetadata

 public FontPropertyMetadata(
     object defaultValue,
     PropertyChangedCallback changeCallback,
     DependencyProperty targetProperty
     )
     : base(defaultValue, changeCallback)
 {
     TargetProperty = targetProperty;
 }
开发者ID:mhusen,项目名称:Eto,代码行数:9,代码来源:fontchooser.xaml.cs


示例18: FrameworkPropertyMetadata

 public FrameworkPropertyMetadata(object defaultValue = null, PropertyChangedCallback propertyChangedCallback = null, CoerceValueCallback coerceValueCallback = null, bool inherits = false,
     bool affectsMeasure = false, bool affectsArrange = false, bool bindsTwoWayByDefault = false, UpdateSourceTrigger defaultUpdateSourceTrigger = UpdateSourceTrigger.Default)
     : base(defaultValue, propertyChangedCallback, coerceValueCallback, inherits)
 {
     this.AffectsMeasure = affectsMeasure;
     this.AffectsArrange = affectsArrange;
     this.BindsTwoWayByDefault = bindsTwoWayByDefault;
     this.DefaultUpdateSourceTrigger = defaultUpdateSourceTrigger;
 }
开发者ID:highzion,项目名称:Granular,代码行数:9,代码来源:FrameworkPropertyMetadata.cs


示例19: RegisterAttached

        /// <summary>
        /// Register an attached dependency / bindable property
        /// </summary>
        /// <param name="name">The property name</param>
        /// <param name="propertyType">The property type</param>
        /// <param name="ownerType">The owner type</param>
        /// <param name="defaultValue">The default value</param>
        /// <param name="propertyChangedCallback">Callback to executed on property changed</param>
        /// <returns>The registred attached dependecy property</returns>
        public static DependencyProperty RegisterAttached(string name, Type propertyType, Type ownerType, object defaultValue = null, PropertyChangedCallback propertyChangedCallback = null) {
#if XFORMS
            return DependencyProperty.CreateAttached(name, propertyType, ownerType, defaultValue, propertyChanged: (obj, oldValue, newValue) => {
                if (propertyChangedCallback != null)
                    propertyChangedCallback(obj, new DependencyPropertyChangedEventArgs(newValue, oldValue, null));
            });
#else
            return DependencyProperty.RegisterAttached(name, propertyType, ownerType, new PropertyMetadata(defaultValue, propertyChangedCallback));
#endif
        }
开发者ID:CrazyBBer,项目名称:Caliburn.Micro.Learn,代码行数:19,代码来源:DependencyPropertyHelper.cs


示例20: GameManagerProperties

        static GameManagerProperties()
        {
            PropertyChangedCallback dockingManagerChanged =
                new PropertyChangedCallback(OnDockingManagerChanged);
            PropertyMetadata dockingManagerMetadata =
                new PropertyMetadata(null, dockingManagerChanged);

            DockingManagerProperty = DependencyProperty.RegisterAttached("DockingManager",
                typeof(DockingManager), typeof(GameManagerProperties), dockingManagerMetadata);
        }
开发者ID:MartyIX,项目名称:SoTh,代码行数:10,代码来源:class.GameDocsProperties.cs



注:本文中的PropertyChangedCallback类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# PropertyChangedEventArgs类代码示例发布时间:2022-05-24
下一篇:
C# PropertyBag类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap