public override void FinishInitialization(IParserContext context) { base.FinishInitialization(context); string targetProperty = Storyboard.GetTargetProperty(this); _propertyExpression = String.IsNullOrEmpty(targetProperty) ? null : PathExpression.Compile(context, targetProperty); }
public override void FinishInitialization(IParserContext context) { base.FinishInitialization(context); string path = Path ?? ""; _compiledPath = string.IsNullOrEmpty(path) ? null : PathExpression.Compile(context, path); }
void IEvaluableMarkupExtension.Initialize(IParserContext context) { if (_path == null) { throw new XamlBindingException("CommandBaseMarkupExtension: Path mustn't be null"); } _compiledPath = PathExpression.Compile(context, _path); }
void IInitializable.FinishInitialization(IParserContext context) { if (_path == null) { throw new XamlBindingException("{0}: Path mustn't be null", GetType().Name); } _compiledPath = PathExpression.Compile(context, _path); ResourceDictionary.RegisterUnmodifiableResourceDuringParsingProcess(this, context); }
void IEvaluableMarkupExtension.Initialize(IParserContext context) { string localName; string namespaceURI; context.LookupNamespace(_typeName, out localName, out namespaceURI); Type type = context.GetNamespaceHandler(namespaceURI).GetElementType(localName); IDataDescriptor result; try { if (PathExpression.Compile(context, _staticMemberName).Evaluate( new ValueDataDescriptor(type), out result)) { _value = result.Value; } } catch (XamlBindingException e) { ServiceRegistration.Get <ILogger>().Warn("Error evaluating Static markup", e); } }