private static void StopSpyingFacade(UIElement sourceElement, CompositionFacadeType facadeType) { if (sourceElement == null) { throw new ArgumentException(); } CompositionPropertySet propertySet = null; Dictionary <string, ExpressionAnimation> expressionAnimations = null; ExpressionAnimation expressionAnimation = null; string propertySetPropertyName = null; GetExpressionAnimation <UIElement>( sourceElement, FacadeTypeToStringName(facadeType), s_elementsDictionary, out propertySet, out expressionAnimations, out expressionAnimation, out propertySetPropertyName); if (propertySet != null) { propertySet.StopAnimation(propertySetPropertyName); expressionAnimations.Remove(propertySetPropertyName); } }
private static string FacadeTypeToStringName(CompositionFacadeType facadeType) { switch (facadeType) { case CompositionFacadeType.Translation: return(c_translationFacadeName); case CompositionFacadeType.Scale: return(c_scaleFacadeName); default: return(""); } }
private static void StartSpyingFacade( UIElement sourceElement, Compositor compositor, CompositionFacadeType facadeType, out CompositionPropertySet propertySet, out ExpressionAnimation expressionAnimation, out string propertySetPropertyName) { propertySet = null; propertySetPropertyName = null; expressionAnimation = null; if (sourceElement == null) { throw new ArgumentException(); } propertySetPropertyName = FacadeTypeToStringName(facadeType); StartSpy <UIElement>(sourceElement, s_elementsDictionary, compositor, ref propertySetPropertyName, ref propertySetPropertyName, out propertySet, out expressionAnimation); expressionAnimation.SetExpressionReferenceParameter(c_source, sourceElement); }
private static CompositionGetValueStatus TryGetFacadeValue(UIElement sourceElement, CompositionFacadeType facadeType, out object value) { value = null; //Once we add a facade which isn't of type Vector3 we'll need to switch on the facade type to specify the return type. return(TryGetValue <UIElement>(sourceElement, s_elementsDictionary, FacadeTypeToStringName(facadeType), CompositionPropertyType.Vector3, out value)); }