当前位置: 首页>>代码示例>>C#>>正文


C# PropertyChangedEventArgs.PropertyNameMatches方法代码示例

本文整理汇总了C#中System.ComponentModel.PropertyChangedEventArgs.PropertyNameMatches方法的典型用法代码示例。如果您正苦于以下问题:C# PropertyChangedEventArgs.PropertyNameMatches方法的具体用法?C# PropertyChangedEventArgs.PropertyNameMatches怎么用?C# PropertyChangedEventArgs.PropertyNameMatches使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.ComponentModel.PropertyChangedEventArgs的用法示例。


在下文中一共展示了PropertyChangedEventArgs.PropertyNameMatches方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnElementPropertyChanged

	    /// <summary>
	    /// Raises the element property changed event.
	    /// </summary>
	    /// <param name="sender">Sender.</param>
	    /// <param name="e">E.</param>
	    protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
	    {
	        base.OnElementPropertyChanged(sender, e);
            var extendedListView = Element as ExtendedListView;
	        if (extendedListView == null)
	            return;

            if (e.PropertyNameMatches(() => extendedListView.ShowEmptyCells))
                SetShowEmptyCells(extendedListView);

            if (e.PropertyNameMatches(() => extendedListView.AlwaysBounceVertical))
                SetAlwaysBounceVertical(extendedListView);
	    }
开发者ID:jimbobbennett,项目名称:JimLib.Xamarin,代码行数:18,代码来源:ExtendedListViewRenderer.cs

示例2: OnElementPropertyChanged

        protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            base.OnElementPropertyChanged(sender, e);

            var imageElement = (ExtendedImage)Element;

            if (e.PropertyNameMatches(() => imageElement.TintColor) ||
                e.PropertyNameMatches(() => Element.Source))
                SetTintColor(imageElement.TintColor);

            if (e.PropertyNameMatches(() => imageElement.ImageLabelText) ||
                e.PropertyNameMatches(() => imageElement.LabelColor))
            {
                SetLabelDetails(imageElement);
                BuildFallbackImage();
            }
            if (e.PropertyNameMatches(() => imageElement.Circular))
                SetCircular(imageElement);
        }
开发者ID:jimbobbennett,项目名称:JimLib.Xamarin,代码行数:19,代码来源:ExtendedImageRenderer.cs

示例3: ExtendedCellOnPropertyChanged

        private void ExtendedCellOnPropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            var extendedCell = (ExtendedViewCell) sender;
            if (!e.PropertyNameMatches(() => extendedCell.ShowDisclosure)) return;

            UITableViewCell cell;
            if (!_cellMappings.TryGetValue((ExtendedViewCell) sender, out cell)) return;
            try
            {
                SetDiscolosure(extendedCell, cell);
            }
            catch (Exception ex)
            {
                Debug.WriteLine("Failed to update cell: " + ex.Message);
            }
        }
开发者ID:jimbobbennett,项目名称:JimLib.Xamarin,代码行数:16,代码来源:ExtendedViewCellRenderer.cs

示例4: ViewModelOnPropertyChanged

        private void ViewModelOnPropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            var busy = BindingContext as IBusy;

            if (busy == null) return;
            if (e.PropertyNameMatches(() => busy.IsBusy))
            {
                _opacityGrid.IsVisible = busy.IsBusy;
                _activityFrame.IsVisible = busy.IsBusy;
                _activityIndicator.IsRunning = busy.IsBusy;
            }

            if (e.PropertyNameMatches(() => busy.BusyMessage))
                _activityLabel.Text = busy.BusyMessage;
        }
开发者ID:jimbobbennett,项目名称:JimLib.Xamarin,代码行数:15,代码来源:BaseContentPage.cs


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