本文整理汇总了C#中Transitions.Transition.removeProperty方法的典型用法代码示例。如果您正苦于以下问题:C# Transition.removeProperty方法的具体用法?C# Transition.removeProperty怎么用?C# Transition.removeProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Transitions.Transition
的用法示例。
在下文中一共展示了Transition.removeProperty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: removeDuplicates
/// <summary>
/// Finds any properties in the old-transition that are also in the new one,
/// and removes them from the old one.
/// </summary>
private void removeDuplicates(Transition newTransition, Transition oldTransition)
{
// Note: This checking might be a bit more efficient if it did the checking
// with a set rather than looking through lists. That said, it is only done
// when transitions are added (which isn't very often) rather than on the
// timer, so I don't think this matters too much.
// We get the list of properties for the old and new transitions...
IList<Transition.TransitionedPropertyInfo> newProperties = newTransition.TransitionedProperties;
IList<Transition.TransitionedPropertyInfo> oldProperties = oldTransition.TransitionedProperties;
// We loop through the old properties backwards (as we may be removing
// items from the list if we find a match)...
for (int i = oldProperties.Count - 1; i >= 0; i--)
{
// We get one of the properties from the old transition...
Transition.TransitionedPropertyInfo oldProperty = oldProperties[i];
// Is this property part of the new transition?
foreach (Transition.TransitionedPropertyInfo newProperty in newProperties)
{
if (oldProperty.target == newProperty.target
&&
oldProperty.propertyInfo == newProperty.propertyInfo)
{
// The old transition contains the same property as the new one,
// so we remove it from the old transition...
oldTransition.removeProperty(oldProperty);
}
}
}
}