本文整理汇总了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);
}
示例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);
}
示例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);
}
}
示例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;
}