コード例 #1
0
 public override object ProvideValue(MarkupExtensionContext extensionContext)
 {
     return new RelativeSource
     {
         Mode = Mode,
     };
 }
コード例 #2
0
 public override object ProvideValue(MarkupExtensionContext markupExtensionContext)
 {
     var typeRepository = markupExtensionContext.ValueContext.TypeRepository;
     var typeAndMember = GetTypeAndMember(Identifier);
     var prefixAndType = GetPrefixAndType(typeAndMember.Item1);
     var xamlType = typeRepository.GetByPrefix(prefixAndType.Item1, prefixAndType.Item2);
     return GetValue(xamlType.UnderlyingType, typeAndMember.Item2);
 }
コード例 #3
0
ファイル: TypeExtension.cs プロジェクト: rdterner/Perspex
        public override object ProvideValue(MarkupExtensionContext markupExtensionContext)
        {
            if (Type != null)
            {
                return Type;
            }

            return ResolveFromString(TypeName, markupExtensionContext.TypeRepository);
        }
コード例 #4
0
 public override object ProvideValue(MarkupExtensionContext extensionContext)
 {
     return new Binding
     {
         Converter = Converter,
         Mode = Mode,
         SourcePropertyPath = Path,
     };
 }
コード例 #5
0
ファイル: BindingExtension.cs プロジェクト: furesoft/Perspex
 public override object ProvideValue(MarkupExtensionContext extensionContext)
 {
     return new Binding
     {
         Converter = Converter,
         ElementName = ElementName,
         Mode = Mode,
         Path = Path,
     };
 }
コード例 #6
0
 public override object ProvideValue(MarkupExtensionContext extensionContext)
 {
     return new Data.Binding
     {
         Converter = Converter,
         Mode = Mode,
         Priority = BindingPriority.TemplatedParent,
         RelativeSource = new RelativeSource(RelativeSourceMode.TemplatedParent),
         SourcePropertyPath = Path,
     };
 }
コード例 #7
0
 public override object ProvideValue(MarkupExtensionContext extensionContext)
 {
     return new Binding
     {
         Converter = Converter,
         ElementName = ElementName,
         Mode = Mode,
         RelativeSource = new RelativeSource(RelativeSourceMode.TemplatedParent),
         Path = Path,
         Priority = Priority,
     };
 }
コード例 #8
0
 public override object ProvideValue(MarkupExtensionContext extensionContext)
 {
     return new Binding
     {
         Converter = Converter,
         ConverterParameter = ConverterParameter,
         ElementName = ElementName,
         FallbackValue = FallbackValue,
         Mode = Mode,
         Path = Path,
         Priority = Priority,
     };
 }
コード例 #9
0
ファイル: BindingExtension.cs プロジェクト: Scellow/Perspex
        public override object ProvideValue(MarkupExtensionContext extensionContext)
        {
            var target = extensionContext.TargetObject as Control;
            var targetProperty = extensionContext.TargetProperty;
            var targetPropertyName = targetProperty.Name;
            var perspexProperty = target.GetRegisteredProperties().First(property => property.Name == targetPropertyName);

            return new XamlBindingDefinition
                (
                target,
                perspexProperty,
                new PropertyPath(this.Path),
                this.Mode == BindingMode.Default ? BindingMode.OneWay : this.Mode
                );
        }
コード例 #10
0
ファイル: BindingExtension.cs プロジェクト: rdterner/Perspex
 public override object ProvideValue(MarkupExtensionContext extensionContext)
 {
     return new XamlBindingDefinition(Path, Mode);
 }
コード例 #11
0
 public override object ProvideValue(MarkupExtensionContext extensionContext)
 {
     return new StyleResourceBinding(this.Name);
 }