Example #1
0
 public StyleService(IDependencyPropertyService <DependencyObject, Style, DependencyProperty> dependencyService,
                     IMarkupExtensionParser markupExtensionParser)
 {
     this.dependencyService     = dependencyService;
     this.markupExtensionParser = markupExtensionParser;
     this.typeNameResolver      = new CssTypeHelper <DependencyObject, DependencyProperty, Style>(markupExtensionParser, dependencyService);
 }
Example #2
0
 public StyleService(IDependencyPropertyService <BindableObject, Style, BindableProperty> dependencyService,
                     IMarkupExtensionParser markupExtensionParser)
 {
     this.dependencyService     = dependencyService;
     this.markupExtensionParser = markupExtensionParser;
     this.typeNameResolver      = new CssTypeHelper <BindableObject, BindableProperty, Style>(markupExtensionParser, dependencyService);
     this.typeConverterProvider = new XamarinTypeConverterProvider();
 }
Example #3
0
        public BaseCss(IDependencyPropertyService <TDependencyObject, TUIElement, TStyle, TDependencyProperty> dependencyPropertyService,
                       ITreeNodeProvider <TDependencyObject> treeNodeProvider,
                       IStyleResourcesService applicationResourcesService,
                       INativeStyleService <TStyle, TDependencyObject, TDependencyProperty> nativeStyleService,
                       string defaultCssNamespace,
                       IMarkupExtensionParser markupExpressionParser,
                       Action <Action> uiInvoker)
        {
            this.dependencyPropertyService   = dependencyPropertyService;
            this.treeNodeProvider            = treeNodeProvider;
            this.applicationResourcesService = applicationResourcesService;
            this.nativeStyleService          = nativeStyleService;
            this.markupExpressionParser      = markupExpressionParser;
            this.uiInvoker = uiInvoker;

            CssParser.Initialize(defaultCssNamespace);
        }
Example #4
0
        public BaseCss(IDependencyPropertyService <TDependencyObject, TUIElement, TStyle, TDependencyProperty> dependencyPropertyService,
                       ITreeNodeProvider <TDependencyObject> treeNodeProvider,
                       IStyleResourcesService applicationResourcesService,
                       INativeStyleService <TStyle, TDependencyObject, TDependencyProperty> nativeStyleService,
                       string defaultCssNamespace,
                       IMarkupExtensionParser markupExpressionParser,
                       Action <Action> uiInvoker,
                       ICssFileProvider fileProvider)
        {
            this.dependencyPropertyService   = dependencyPropertyService;
            this.treeNodeProvider            = treeNodeProvider;
            this.applicationResourcesService = applicationResourcesService;
            this.nativeStyleService          = nativeStyleService;
            this.markupExpressionParser      = markupExpressionParser;
            this.uiInvoker     = uiInvoker;
            this.cssTypeHelper = new CssTypeHelper <TDependencyObject, TUIElement, TDependencyProperty, TStyle>(markupExpressionParser, dependencyPropertyService);

            CssParser.Initialize(defaultCssNamespace, fileProvider);
            StyleSheet.GetParent     = parent => treeNodeProvider.GetParent((TDependencyObject)parent);
            StyleSheet.GetStyleSheet = treeNode => dependencyPropertyService.GetStyleSheet((TDependencyObject)treeNode);
        }
Example #5
0
 public CssTypeHelper(IMarkupExtensionParser markupExpressionParser,
                      IDependencyPropertyService <TDependencyObject, TUIElement, TStyle, TDependencyProperty> dependencyPropertyService)
 {
     this.markupExpressionParser    = markupExpressionParser;
     this.dependencyPropertyService = dependencyPropertyService;
 }