コード例 #1
0
        private void ExtendTree(object sender, RoutedEventArgs e)
        {
            Button sendie  = (Button)sender;
            int    indexAt = MainGrid.Children.IndexOf(sendie);

            if (sendie.Content.Equals("+ " + elses))
            {
                MainGrid.Children.RemoveAt(indexAt);

                TextBlock el = new TextBlock();
                el.Text = elses;
                el.SetValue(Grid.RowProperty, indexAt);

                Ring rng = new SpeakCode.Ring();
                rng.SetValue(Grid.RowProperty, indexAt + 1);

                Button bt = new Button();
                bt.Content = "+ " + ifs;
                bt.Click  += ExtendTree;
                bt.SetValue(Grid.RowProperty, indexAt + 2);

                MainGrid.Children.Add(el);
                MainGrid.Children.Add(rng);
                MainGrid.Children.Add(bt);

                RowDefinition defineRow2 = new RowDefinition();
                defineRow2.SetValue(RowDefinition.HeightProperty, (new GridLength(50, GridUnitType.Pixel)));
                MainGrid.RowDefinitions.Add(defineRow2);

                RowDefinition defineRow3 = new RowDefinition();
                defineRow3.SetValue(RowDefinition.HeightProperty, (new GridLength(1, GridUnitType.Auto)));
                MainGrid.RowDefinitions.Add(defineRow3);
            }
            else
            {
                MainGrid.Children.RemoveAt(indexAt - 2);

                StackPanel st = new StackPanel();
                st.Orientation = Orientation.Horizontal;
                st.SetValue(Grid.RowProperty, indexAt - 2);

                TextBlock ifel = new TextBlock();
                ifel.Text = elses + " " + ifs;

                TextBox cond = new TextBox();

                st.Children.Add(ifel);
                st.Children.Add(cond);

                sendie.Content = "+ " + elses;

                MainGrid.Children.Insert(indexAt - 2, st);
            }
        }
コード例 #2
0
        protected override void OnAttached()
        {
            base.OnAttached();

            var grid = this.AssociatedObject;

            grid.RowDefinitions.Clear();
            grid.Children.Clear();

            var items = GetItems(grid);

            if (items == null)
            {
                return;
            }

            int rowIndex = 0;

            foreach (var item in items)
            {
                // Add RowDefinition
                var rowDefinition = new RowDefinition();
                rowDefinition.SetValue(RowDefinition.HeightProperty, GridLength.Auto);
                grid.RowDefinitions.Add(rowDefinition);

                // Add controls for each column.
                for (int columnIndex = 0; columnIndex < grid.ColumnDefinitions.Count; columnIndex++)
                {
                    var columnDefinition = grid.ColumnDefinitions[columnIndex];

                    // Create a control from corresponding template.
                    var template = GetColumnTemplate(columnDefinition) ?? new ControlTemplate(typeof(ContentControl));
                    var control  = (FrameworkElement)template.LoadContent();
                    // Set data context
                    control.DataContext = item;
                    // Set Grid.Column and Grid.Row property
                    Grid.SetColumn(control, columnIndex);
                    Grid.SetRow(control, rowIndex);
                    // Add to the grid.
                    grid.Children.Add(control);
                }

                rowIndex++;
            }
        }
コード例 #3
0
        public void populateQuestions()
        {
            List <Question> questions = App.quesList;
            int             i         = 0;

            foreach (Question q in questions)
            {
                Button ques = new Button();
                ques.SetValue(Button.ContentProperty, q.id + "." + q.pname + " (" + q.pcode + ")");
                ques.Click += OpenQues;
                if ((App.currUser.ques.ToCharArray())[i] == '1')
                {
                    ques.Background = new SolidColorBrush(Colors.Green);
                }

                RowDefinition defineRow = new RowDefinition();
                defineRow.SetValue(RowDefinition.HeightProperty, (new GridLength(1, GridUnitType.Auto)));
                Question.RowDefinitions.Add(defineRow);

                Question.Children.Add(ques);
                ques.SetValue(Grid.RowProperty, i++);
                ques.SetValue(Grid.ColumnProperty, 0);
            }
        }
コード例 #4
0
        public void AddRows(int count)
        {
            TextBox lbl;
            RowDefinition rd = new RowDefinition();
            for (int i = 0; i < count; i++)
            {
                rd = new RowDefinition();
                rd.SetValue(RowDefinition.HeightProperty, new GridLength(GRID_SIZE));
                rowGrid.RowDefinitions.Add(rd);
                lbl = new TextBox();
                lbl.Text = "ROW: " + (Rows);
                Grid.SetRow(lbl, Rows++);
                rowGrid.Children.Add(lbl);

                rd = new RowDefinition();
                rd.SetValue(RowDefinition.HeightProperty, new GridLength(GRID_SIZE));
                timeGrid.RowDefinitions.Add(rd);
            }
        }
コード例 #5
0
        private void InitializeComponent()
        {
            if (ResourceLoader.ResourceProvider != null && ResourceLoader.ResourceProvider(typeof(ReLockPage).GetTypeInfo().Assembly.GetName(), "Views/ReLockPage.xaml") != null)
            {
                this.__InitComponentRuntime();
                return;
            }
            if (XamlLoader.XamlFileProvider != null && XamlLoader.XamlFileProvider(base.GetType()) != null)
            {
                this.__InitComponentRuntime();
                return;
            }
            BindingExtension bindingExtension  = new BindingExtension();
            RowDefinition    rowDefinition     = new RowDefinition();
            RowDefinition    rowDefinition2    = new RowDefinition();
            RowDefinition    rowDefinition3    = new RowDefinition();
            ColumnDefinition columnDefinition  = new ColumnDefinition();
            ColumnDefinition columnDefinition2 = new ColumnDefinition();
            Label            label             = new Label();
            BindingExtension bindingExtension2 = new BindingExtension();
            Label            label2            = new Label();
            Grid             grid = new Grid();
            BindingExtension bindingExtension3 = new BindingExtension();
            TextCell         textCell          = new TextCell();
            BindingExtension bindingExtension4 = new BindingExtension();
            TextCell         textCell2         = new TextCell();
            BindingExtension bindingExtension5 = new BindingExtension();
            TextCell         textCell3         = new TextCell();
            BindingExtension bindingExtension6 = new BindingExtension();
            TextCell         textCell4         = new TextCell();
            TableSection     tableSection      = new TableSection();
            TableRoot        tableRoot         = new TableRoot();
            TableView        tableView         = new TableView();
            ColumnDefinition columnDefinition3 = new ColumnDefinition();
            ColumnDefinition columnDefinition4 = new ColumnDefinition();
            ColumnDefinition columnDefinition5 = new ColumnDefinition();
            BindingExtension bindingExtension7 = new BindingExtension();
            Button           button            = new Button();
            BindingExtension bindingExtension8 = new BindingExtension();
            Button           button2           = new Button();
            Grid             grid2             = new Grid();
            Grid             grid3             = new Grid();
            NameScope        nameScope         = new NameScope();

            NameScope.SetNameScope(this, nameScope);
            NameScope.SetNameScope(grid3, nameScope);
            NameScope.SetNameScope(rowDefinition, nameScope);
            NameScope.SetNameScope(rowDefinition2, nameScope);
            NameScope.SetNameScope(rowDefinition3, nameScope);
            NameScope.SetNameScope(grid, nameScope);
            NameScope.SetNameScope(columnDefinition, nameScope);
            NameScope.SetNameScope(columnDefinition2, nameScope);
            NameScope.SetNameScope(label, nameScope);
            NameScope.SetNameScope(label2, nameScope);
            NameScope.SetNameScope(tableView, nameScope);
            ((INameScope)nameScope).RegisterName("tableView", tableView);
            if (tableView.StyleId == null)
            {
                tableView.StyleId = "tableView";
            }
            NameScope.SetNameScope(tableRoot, nameScope);
            NameScope.SetNameScope(tableSection, nameScope);
            NameScope.SetNameScope(textCell, nameScope);
            NameScope.SetNameScope(textCell2, nameScope);
            NameScope.SetNameScope(textCell3, nameScope);
            NameScope.SetNameScope(textCell4, nameScope);
            NameScope.SetNameScope(grid2, nameScope);
            NameScope.SetNameScope(columnDefinition3, nameScope);
            NameScope.SetNameScope(columnDefinition4, nameScope);
            NameScope.SetNameScope(columnDefinition5, nameScope);
            NameScope.SetNameScope(button, nameScope);
            NameScope.SetNameScope(button2, nameScope);
            this.tableView = tableView;
            this.SetValue(ViewModelLocator.AutowireViewModelProperty, new bool?(true));
            bindingExtension.Path = "Title";
            BindingBase binding = ((IMarkupExtension <BindingBase>)bindingExtension).ProvideValue(null);

            this.SetBinding(Page.TitleProperty, binding);
            grid3.SetValue(Grid.RowSpacingProperty, 0.0);
            rowDefinition.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("Auto"));
            grid3.GetValue(Grid.RowDefinitionsProperty).Add(rowDefinition);
            rowDefinition2.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("*"));
            grid3.GetValue(Grid.RowDefinitionsProperty).Add(rowDefinition2);
            rowDefinition3.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("Auto"));
            grid3.GetValue(Grid.RowDefinitionsProperty).Add(rowDefinition3);
            grid.SetValue(VisualElement.BackgroundColorProperty, new Color(0.92156863212585449, 0.92156863212585449, 0.92156863212585449, 1.0));
            grid.SetValue(Xamarin.Forms.Layout.PaddingProperty, new Thickness(10.0, 10.0, 10.0, 10.0));
            columnDefinition.SetValue(ColumnDefinition.WidthProperty, new GridLengthTypeConverter().ConvertFromInvariantString("*"));
            grid.GetValue(Grid.ColumnDefinitionsProperty).Add(columnDefinition);
            columnDefinition2.SetValue(ColumnDefinition.WidthProperty, new GridLengthTypeConverter().ConvertFromInvariantString("3*"));
            grid.GetValue(Grid.ColumnDefinitionsProperty).Add(columnDefinition2);
            label.SetValue(Grid.ColumnProperty, 0);
            label.SetValue(Label.TextProperty, "当前地址");
            label.SetValue(Label.TextColorProperty, new Color(0.501960813999176, 0.501960813999176, 0.501960813999176, 1.0));
            BindableObject         bindableObject        = label;
            BindableProperty       fontSizeProperty      = Label.FontSizeProperty;
            IExtendedTypeConverter extendedTypeConverter = new FontSizeConverter();
            string value = "Default";
            XamlServiceProvider xamlServiceProvider = new XamlServiceProvider();
            Type typeFromHandle = typeof(IProvideValueTarget);

            object[] array = new object[0 + 4];
            array[0] = label;
            array[1] = grid;
            array[2] = grid3;
            array[3] = this;
            xamlServiceProvider.Add(typeFromHandle, new SimpleValueTargetProvider(array, Label.FontSizeProperty));
            xamlServiceProvider.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle2 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver = new XmlNamespaceResolver();

            xmlNamespaceResolver.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver.Add("prism", "clr-namespace:Prism.Mvvm;assembly=Prism.Forms");
            xmlNamespaceResolver.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xamlServiceProvider.Add(typeFromHandle2, new XamlTypeResolver(xmlNamespaceResolver, typeof(ReLockPage).GetTypeInfo().Assembly));
            xamlServiceProvider.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(20, 82)));
            bindableObject.SetValue(fontSizeProperty, extendedTypeConverter.ConvertFromInvariantString(value, xamlServiceProvider));
            label.SetValue(View.HorizontalOptionsProperty, LayoutOptions.FillAndExpand);
            label.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
            label.SetValue(Label.HorizontalTextAlignmentProperty, new TextAlignmentConverter().ConvertFromInvariantString("Center"));
            grid.Children.Add(label);
            label2.SetValue(Grid.ColumnProperty, 1);
            bindingExtension2.Path = "CurLocation";
            BindingBase binding2 = ((IMarkupExtension <BindingBase>)bindingExtension2).ProvideValue(null);

            label2.SetBinding(Label.TextProperty, binding2);
            BindableObject         bindableObject2        = label2;
            BindableProperty       fontSizeProperty2      = Label.FontSizeProperty;
            IExtendedTypeConverter extendedTypeConverter2 = new FontSizeConverter();
            string value2 = "Default";
            XamlServiceProvider xamlServiceProvider2 = new XamlServiceProvider();
            Type typeFromHandle3 = typeof(IProvideValueTarget);

            object[] array2 = new object[0 + 4];
            array2[0] = label2;
            array2[1] = grid;
            array2[2] = grid3;
            array2[3] = this;
            xamlServiceProvider2.Add(typeFromHandle3, new SimpleValueTargetProvider(array2, Label.FontSizeProperty));
            xamlServiceProvider2.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle4 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver2 = new XmlNamespaceResolver();

            xmlNamespaceResolver2.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver2.Add("prism", "clr-namespace:Prism.Mvvm;assembly=Prism.Forms");
            xmlNamespaceResolver2.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xamlServiceProvider2.Add(typeFromHandle4, new XamlTypeResolver(xmlNamespaceResolver2, typeof(ReLockPage).GetTypeInfo().Assembly));
            xamlServiceProvider2.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(21, 77)));
            bindableObject2.SetValue(fontSizeProperty2, extendedTypeConverter2.ConvertFromInvariantString(value2, xamlServiceProvider2));
            label2.SetValue(View.HorizontalOptionsProperty, LayoutOptions.FillAndExpand);
            label2.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
            grid.Children.Add(label2);
            grid3.Children.Add(grid);
            tableView.Intent = TableIntent.Form;
            tableView.SetValue(Grid.RowProperty, 1);
            tableView.SetValue(TableView.HasUnevenRowsProperty, true);
            tableView.SetValue(VisualElement.BackgroundColorProperty, new Color(0.9843137264251709, 0.9843137264251709, 0.9843137264251709, 1.0));
            textCell.SetValue(TextCell.TextProperty, "起始时间");
            bindingExtension3.Path = "Begintime";
            BindingBase binding3 = ((IMarkupExtension <BindingBase>)bindingExtension3).ProvideValue(null);

            textCell.SetBinding(TextCell.DetailProperty, binding3);
            textCell.SetValue(TextCell.DetailColorProperty, Color.Black);
            tableSection.Add(textCell);
            textCell2.SetValue(TextCell.TextProperty, "目的地址");
            bindingExtension4.Path = "Address";
            BindingBase binding4 = ((IMarkupExtension <BindingBase>)bindingExtension4).ProvideValue(null);

            textCell2.SetBinding(TextCell.DetailProperty, binding4);
            textCell2.SetValue(TextCell.DetailColorProperty, Color.Black);
            tableSection.Add(textCell2);
            textCell3.SetValue(TextCell.TextProperty, "运输状态");
            bindingExtension5.Path = "Status";
            BindingBase binding5 = ((IMarkupExtension <BindingBase>)bindingExtension5).ProvideValue(null);

            textCell3.SetBinding(TextCell.DetailProperty, binding5);
            textCell3.SetValue(TextCell.DetailColorProperty, Color.Black);
            tableSection.Add(textCell3);
            textCell4.SetValue(TextCell.TextProperty, "施封位置");
            bindingExtension6.Path = "LockLocation";
            BindingBase binding6 = ((IMarkupExtension <BindingBase>)bindingExtension6).ProvideValue(null);

            textCell4.SetBinding(TextCell.DetailProperty, binding6);
            textCell4.SetValue(TextCell.DetailColorProperty, Color.Black);
            tableSection.Add(textCell4);
            tableRoot.Add(tableSection);
            tableView.Root = tableRoot;
            grid3.Children.Add(tableView);
            grid2.SetValue(Grid.RowProperty, 2);
            grid2.SetValue(Xamarin.Forms.Layout.PaddingProperty, new Thickness(20.0, 5.0, 20.0, 5.0));
            grid2.SetValue(VisualElement.BackgroundColorProperty, Color.White);
            columnDefinition3.SetValue(ColumnDefinition.WidthProperty, new GridLengthTypeConverter().ConvertFromInvariantString("*"));
            grid2.GetValue(Grid.ColumnDefinitionsProperty).Add(columnDefinition3);
            columnDefinition4.SetValue(ColumnDefinition.WidthProperty, new GridLengthTypeConverter().ConvertFromInvariantString("50"));
            grid2.GetValue(Grid.ColumnDefinitionsProperty).Add(columnDefinition4);
            columnDefinition5.SetValue(ColumnDefinition.WidthProperty, new GridLengthTypeConverter().ConvertFromInvariantString("*"));
            grid2.GetValue(Grid.ColumnDefinitionsProperty).Add(columnDefinition5);
            button.SetValue(Grid.ColumnProperty, 0);
            button.SetValue(Button.TextProperty, "新建运输");
            bindingExtension7.Path = "NewCommand";
            BindingBase binding7 = ((IMarkupExtension <BindingBase>)bindingExtension7).ProvideValue(null);

            button.SetBinding(Button.CommandProperty, binding7);
            button.SetValue(Button.TextColorProperty, new Color(0.050980392843484879, 0.27843138575553894, 0.63137257099151611, 1.0));
            button.SetValue(VisualElement.BackgroundColorProperty, Color.White);
            button.SetValue(Button.BorderRadiusProperty, 10);
            button.SetValue(Button.BorderColorProperty, new Color(0.050980392843484879, 0.27843138575553894, 0.63137257099151611, 1.0));
            button.SetValue(Button.BorderWidthProperty, 1.0);
            grid2.Children.Add(button);
            button2.SetValue(Grid.ColumnProperty, 2);
            button2.SetValue(Button.TextProperty, "继续施封");
            bindingExtension8.Path = "ContinueCommand";
            BindingBase binding8 = ((IMarkupExtension <BindingBase>)bindingExtension8).ProvideValue(null);

            button2.SetBinding(Button.CommandProperty, binding8);
            button2.SetValue(Button.TextColorProperty, Color.White);
            button2.SetValue(VisualElement.BackgroundColorProperty, new Color(0.050980392843484879, 0.27843138575553894, 0.63137257099151611, 1.0));
            button2.SetValue(Button.BorderRadiusProperty, 10);
            button2.SetValue(Button.BorderColorProperty, new Color(0.050980392843484879, 0.27843138575553894, 0.63137257099151611, 1.0));
            button2.SetValue(Button.BorderWidthProperty, 1.0);
            grid2.Children.Add(button2);
            grid3.Children.Add(grid2);
            this.SetValue(ContentPage.ContentProperty, grid3);
        }
コード例 #6
0
ファイル: SelectCell.cs プロジェクト: XiaoBaiXJ/RFID
        private void InitializeComponent()
        {
            if (ResourceLoader.ResourceProvider != null && ResourceLoader.ResourceProvider(typeof(SelectCell).GetTypeInfo().Assembly.GetName(), "Layout/SelectCell.xaml") != null)
            {
                this.__InitComponentRuntime();
                return;
            }
            if (XamlLoader.XamlFileProvider != null && XamlLoader.XamlFileProvider(base.GetType()) != null)
            {
                this.__InitComponentRuntime();
                return;
            }
            ColumnDefinition     columnDefinition     = new ColumnDefinition();
            ColumnDefinition     columnDefinition2    = new ColumnDefinition();
            RowDefinition        rowDefinition        = new RowDefinition();
            TapGestureRecognizer tapGestureRecognizer = new TapGestureRecognizer();
            Label          label          = new Label();
            NoBorderEntry  noBorderEntry  = new NoBorderEntry();
            Label          label2         = new Label();
            SvgCachedImage svgCachedImage = new SvgCachedImage();
            Grid           grid           = new Grid();
            NameScope      nameScope      = new NameScope();

            NameScope.SetNameScope(this, nameScope);
            NameScope.SetNameScope(grid, nameScope);
            ((INameScope)nameScope).RegisterName("view", grid);
            if (grid.StyleId == null)
            {
                grid.StyleId = "view";
            }
            NameScope.SetNameScope(columnDefinition, nameScope);
            NameScope.SetNameScope(columnDefinition2, nameScope);
            NameScope.SetNameScope(rowDefinition, nameScope);
            NameScope.SetNameScope(tapGestureRecognizer, nameScope);
            NameScope.SetNameScope(label, nameScope);
            ((INameScope)nameScope).RegisterName("label", label);
            if (label.StyleId == null)
            {
                label.StyleId = "label";
            }
            NameScope.SetNameScope(noBorderEntry, nameScope);
            ((INameScope)nameScope).RegisterName("entry", noBorderEntry);
            if (noBorderEntry.StyleId == null)
            {
                noBorderEntry.StyleId = "entry";
            }
            NameScope.SetNameScope(label2, nameScope);
            ((INameScope)nameScope).RegisterName("placeLabel", label2);
            if (label2.StyleId == null)
            {
                label2.StyleId = "placeLabel";
            }
            NameScope.SetNameScope(svgCachedImage, nameScope);
            ((INameScope)nameScope).RegisterName("arrow", svgCachedImage);
            if (svgCachedImage.StyleId == null)
            {
                svgCachedImage.StyleId = "arrow";
            }
            this.view       = grid;
            this.label      = label;
            this.entry      = noBorderEntry;
            this.placeLabel = label2;
            this.arrow      = svgCachedImage;
            grid.SetValue(VisualElement.BackgroundColorProperty, Color.White);
            grid.SetValue(Grid.RowSpacingProperty, 5.0);
            grid.SetValue(Layout.PaddingProperty, new Thickness(10.0, 5.0, 10.0, 5.0));
            columnDefinition.SetValue(ColumnDefinition.WidthProperty, new GridLengthTypeConverter().ConvertFromInvariantString("*"));
            grid.GetValue(Grid.ColumnDefinitionsProperty).Add(columnDefinition);
            columnDefinition2.SetValue(ColumnDefinition.WidthProperty, new GridLengthTypeConverter().ConvertFromInvariantString("3*"));
            grid.GetValue(Grid.ColumnDefinitionsProperty).Add(columnDefinition2);
            rowDefinition.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("Auto"));
            grid.GetValue(Grid.RowDefinitionsProperty).Add(rowDefinition);
            tapGestureRecognizer.Tapped += this.TapGestureRecognizer_Tapped;
            grid.GestureRecognizers.Add(tapGestureRecognizer);
            BindableObject         bindableObject        = label;
            BindableProperty       fontSizeProperty      = Label.FontSizeProperty;
            IExtendedTypeConverter extendedTypeConverter = new FontSizeConverter();
            string value = "Default";
            XamlServiceProvider xamlServiceProvider = new XamlServiceProvider();
            Type typeFromHandle = typeof(IProvideValueTarget);

            object[] array = new object[0 + 3];
            array[0] = label;
            array[1] = grid;
            array[2] = this;
            xamlServiceProvider.Add(typeFromHandle, new SimpleValueTargetProvider(array, Label.FontSizeProperty));
            xamlServiceProvider.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle2 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver = new XmlNamespaceResolver();

            xmlNamespaceResolver.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver.Add("svg", "clr-namespace:FFImageLoading.Svg.Forms;assembly=FFImageLoading.Svg.Forms");
            xamlServiceProvider.Add(typeFromHandle2, new XamlTypeResolver(xmlNamespaceResolver, typeof(SelectCell).GetTypeInfo().Assembly));
            xamlServiceProvider.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(19, 20)));
            bindableObject.SetValue(fontSizeProperty, extendedTypeConverter.ConvertFromInvariantString(value, xamlServiceProvider));
            label.SetValue(Label.TextColorProperty, new Color(0.501960813999176, 0.501960813999176, 0.501960813999176, 1.0));
            label.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
            label.SetValue(View.HorizontalOptionsProperty, LayoutOptions.FillAndExpand);
            label.SetValue(Label.HorizontalTextAlignmentProperty, new TextAlignmentConverter().ConvertFromInvariantString("Start"));
            label.SetValue(Grid.ColumnProperty, 0);
            grid.Children.Add(label);
            noBorderEntry.SetValue(VisualElement.BackgroundColorProperty, Color.White);
            noBorderEntry.SetValue(VisualElement.WidthRequestProperty, 1.0);
            BindableObject         bindableObject2        = noBorderEntry;
            BindableProperty       fontSizeProperty2      = Entry.FontSizeProperty;
            IExtendedTypeConverter extendedTypeConverter2 = new FontSizeConverter();
            string value2 = "Default";
            XamlServiceProvider xamlServiceProvider2 = new XamlServiceProvider();
            Type typeFromHandle3 = typeof(IProvideValueTarget);

            object[] array2 = new object[0 + 3];
            array2[0] = noBorderEntry;
            array2[1] = grid;
            array2[2] = this;
            xamlServiceProvider2.Add(typeFromHandle3, new SimpleValueTargetProvider(array2, Entry.FontSizeProperty));
            xamlServiceProvider2.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle4 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver2 = new XmlNamespaceResolver();

            xmlNamespaceResolver2.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver2.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver2.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver2.Add("svg", "clr-namespace:FFImageLoading.Svg.Forms;assembly=FFImageLoading.Svg.Forms");
            xamlServiceProvider2.Add(typeFromHandle4, new XamlTypeResolver(xmlNamespaceResolver2, typeof(SelectCell).GetTypeInfo().Assembly));
            xamlServiceProvider2.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(20, 92)));
            bindableObject2.SetValue(fontSizeProperty2, extendedTypeConverter2.ConvertFromInvariantString(value2, xamlServiceProvider2));
            noBorderEntry.SetValue(Grid.ColumnProperty, 1);
            noBorderEntry.SetValue(View.HorizontalOptionsProperty, LayoutOptions.End);
            noBorderEntry.SetValue(VisualElement.IsEnabledProperty, false);
            grid.Children.Add(noBorderEntry);
            BindableObject         bindableObject3        = label2;
            BindableProperty       fontSizeProperty3      = Label.FontSizeProperty;
            IExtendedTypeConverter extendedTypeConverter3 = new FontSizeConverter();
            string value3 = "Default";
            XamlServiceProvider xamlServiceProvider3 = new XamlServiceProvider();
            Type typeFromHandle5 = typeof(IProvideValueTarget);

            object[] array3 = new object[0 + 3];
            array3[0] = label2;
            array3[1] = grid;
            array3[2] = this;
            xamlServiceProvider3.Add(typeFromHandle5, new SimpleValueTargetProvider(array3, Label.FontSizeProperty));
            xamlServiceProvider3.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle6 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver3 = new XmlNamespaceResolver();

            xmlNamespaceResolver3.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver3.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver3.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver3.Add("svg", "clr-namespace:FFImageLoading.Svg.Forms;assembly=FFImageLoading.Svg.Forms");
            xamlServiceProvider3.Add(typeFromHandle6, new XamlTypeResolver(xmlNamespaceResolver3, typeof(SelectCell).GetTypeInfo().Assembly));
            xamlServiceProvider3.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(21, 20)));
            bindableObject3.SetValue(fontSizeProperty3, extendedTypeConverter3.ConvertFromInvariantString(value3, xamlServiceProvider3));
            label2.SetValue(Label.TextColorProperty, Color.Black);
            label2.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
            label2.SetValue(View.HorizontalOptionsProperty, LayoutOptions.FillAndExpand);
            label2.SetValue(Label.HorizontalTextAlignmentProperty, new TextAlignmentConverter().ConvertFromInvariantString("Start"));
            label2.SetValue(Grid.ColumnProperty, 1);
            grid.Children.Add(label2);
            svgCachedImage.SetValue(CachedImage.SourceProperty, new FFImageLoading.Forms.ImageSourceConverter().ConvertFromInvariantString("rightarrow.svg"));
            svgCachedImage.SetValue(Grid.ColumnProperty, 1);
            svgCachedImage.SetValue(View.HorizontalOptionsProperty, LayoutOptions.End);
            svgCachedImage.SetValue(VisualElement.WidthRequestProperty, 15.0);
            svgCachedImage.SetValue(VisualElement.HeightRequestProperty, 15.0);
            svgCachedImage.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
            grid.Children.Add(svgCachedImage);
            this.View = grid;
        }
コード例 #7
0
 /// <summary>
 /// Sets the AutoLayout Attached Property Value. Used internally to track items which need to be arranged vs. fixed in place.
 /// </summary>
 /// <param name="element"><see cref="RowDefinition"/></param>
 /// <param name="value">A true value indicates this item should be automatically arranged.</param>
 internal static void SetAutoLayout(RowDefinition element, bool?value)
 {
     element.SetValue(AutoLayoutProperty, value);
 }
コード例 #8
0
        private void InitializeComponent()
        {
            if (ResourceLoader.ResourceProvider != null && ResourceLoader.ResourceProvider(typeof(DataPage).GetTypeInfo().Assembly.GetName(), "Views/DataPage.xaml") != null)
            {
                this.__InitComponentRuntime();
                return;
            }
            if (XamlLoader.XamlFileProvider != null && XamlLoader.XamlFileProvider(base.GetType()) != null)
            {
                this.__InitComponentRuntime();
                return;
            }
            BindingExtension   bindingExtension   = new BindingExtension();
            RowDefinition      rowDefinition      = new RowDefinition();
            RowDefinition      rowDefinition2     = new RowDefinition();
            RowDefinition      rowDefinition3     = new RowDefinition();
            ColumnDefinition   columnDefinition   = new ColumnDefinition();
            ColumnDefinition   columnDefinition2  = new ColumnDefinition();
            TranslateExtension translateExtension = new TranslateExtension();
            Label              label             = new Label();
            BindingExtension   bindingExtension2 = new BindingExtension();
            Label              label2            = new Label();
            Grid               grid = new Grid();
            TranslateExtension translateExtension2  = new TranslateExtension();
            BindingExtension   bindingExtension3    = new BindingExtension();
            NewEntryCell       newEntryCell         = new NewEntryCell();
            TranslateExtension translateExtension3  = new TranslateExtension();
            BindingExtension   bindingExtension4    = new BindingExtension();
            NewEntryCell       newEntryCell2        = new NewEntryCell();
            TranslateExtension translateExtension4  = new TranslateExtension();
            BindingExtension   bindingExtension5    = new BindingExtension();
            NewEntryCell       newEntryCell3        = new NewEntryCell();
            TranslateExtension translateExtension5  = new TranslateExtension();
            BindingExtension   bindingExtension6    = new BindingExtension();
            TranslateExtension translateExtension6  = new TranslateExtension();
            NewEntryCell       newEntryCell4        = new NewEntryCell();
            BindingExtension   bindingExtension7    = new BindingExtension();
            TranslateExtension translateExtension7  = new TranslateExtension();
            TranslateExtension translateExtension8  = new TranslateExtension();
            QRCodeCell         qrcodeCell           = new QRCodeCell();
            TranslateExtension translateExtension9  = new TranslateExtension();
            BindingExtension   bindingExtension8    = new BindingExtension();
            PhotoCell          photoCell            = new PhotoCell();
            TableSection       tableSection         = new TableSection();
            TableRoot          tableRoot            = new TableRoot();
            TableView          tableView            = new TableView();
            TranslateExtension translateExtension10 = new TranslateExtension();
            BindingExtension   bindingExtension9    = new BindingExtension();
            Button             button     = new Button();
            Grid               grid2      = new Grid();
            ScrollView         scrollView = new ScrollView();
            NameScope          nameScope  = new NameScope();

            NameScope.SetNameScope(this, nameScope);
            NameScope.SetNameScope(scrollView, nameScope);
            NameScope.SetNameScope(grid2, nameScope);
            NameScope.SetNameScope(rowDefinition, nameScope);
            NameScope.SetNameScope(rowDefinition2, nameScope);
            NameScope.SetNameScope(rowDefinition3, nameScope);
            NameScope.SetNameScope(grid, nameScope);
            NameScope.SetNameScope(columnDefinition, nameScope);
            NameScope.SetNameScope(columnDefinition2, nameScope);
            NameScope.SetNameScope(label, nameScope);
            NameScope.SetNameScope(label2, nameScope);
            NameScope.SetNameScope(tableView, nameScope);
            NameScope.SetNameScope(tableRoot, nameScope);
            NameScope.SetNameScope(tableSection, nameScope);
            NameScope.SetNameScope(newEntryCell, nameScope);
            NameScope.SetNameScope(newEntryCell2, nameScope);
            NameScope.SetNameScope(newEntryCell3, nameScope);
            NameScope.SetNameScope(newEntryCell4, nameScope);
            NameScope.SetNameScope(qrcodeCell, nameScope);
            NameScope.SetNameScope(photoCell, nameScope);
            ((INameScope)nameScope).RegisterName("photocell", photoCell);
            if (photoCell.StyleId == null)
            {
                photoCell.StyleId = "photocell";
            }
            NameScope.SetNameScope(button, nameScope);
            this.photocell = photoCell;
            this.SetValue(ViewModelLocator.AutowireViewModelProperty, new bool?(true));
            bindingExtension.Path = "Title";
            BindingBase binding = ((IMarkupExtension <BindingBase>)bindingExtension).ProvideValue(null);

            this.SetBinding(Page.TitleProperty, binding);
            grid2.SetValue(Grid.RowSpacingProperty, 0.0);
            rowDefinition.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("Auto"));
            grid2.GetValue(Grid.RowDefinitionsProperty).Add(rowDefinition);
            rowDefinition2.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("480"));
            grid2.GetValue(Grid.RowDefinitionsProperty).Add(rowDefinition2);
            rowDefinition3.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("Auto"));
            grid2.GetValue(Grid.RowDefinitionsProperty).Add(rowDefinition3);
            grid.SetValue(VisualElement.BackgroundColorProperty, new Color(0.92156863212585449, 0.92156863212585449, 0.92156863212585449, 1.0));
            grid.SetValue(Xamarin.Forms.Layout.PaddingProperty, new Thickness(10.0, 10.0, 10.0, 10.0));
            columnDefinition.SetValue(ColumnDefinition.WidthProperty, new GridLengthTypeConverter().ConvertFromInvariantString("*"));
            grid.GetValue(Grid.ColumnDefinitionsProperty).Add(columnDefinition);
            columnDefinition2.SetValue(ColumnDefinition.WidthProperty, new GridLengthTypeConverter().ConvertFromInvariantString("3*"));
            grid.GetValue(Grid.ColumnDefinitionsProperty).Add(columnDefinition2);
            label.SetValue(Grid.ColumnProperty, 0);
            translateExtension.Text = "curaddress";
            IMarkupExtension    markupExtension     = translateExtension;
            XamlServiceProvider xamlServiceProvider = new XamlServiceProvider();
            Type typeFromHandle = typeof(IProvideValueTarget);

            object[] array = new object[0 + 5];
            array[0] = label;
            array[1] = grid;
            array[2] = grid2;
            array[3] = scrollView;
            array[4] = this;
            xamlServiceProvider.Add(typeFromHandle, new SimpleValueTargetProvider(array, Label.TextProperty));
            xamlServiceProvider.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle2 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver = new XmlNamespaceResolver();

            xmlNamespaceResolver.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver.Add("prism", "clr-namespace:Prism.Mvvm;assembly=Prism.Forms");
            xmlNamespaceResolver.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver.Add("local", "clr-namespace:RFID");
            xamlServiceProvider.Add(typeFromHandle2, new XamlTypeResolver(xmlNamespaceResolver, typeof(DataPage).GetTypeInfo().Assembly));
            xamlServiceProvider.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(22, 50)));
            object text = markupExtension.ProvideValue(xamlServiceProvider);

            label.Text = text;
            label.SetValue(Label.TextColorProperty, new Color(0.501960813999176, 0.501960813999176, 0.501960813999176, 1.0));
            BindableObject         bindableObject        = label;
            BindableProperty       fontSizeProperty      = Label.FontSizeProperty;
            IExtendedTypeConverter extendedTypeConverter = new FontSizeConverter();
            string value = "Default";
            XamlServiceProvider xamlServiceProvider2 = new XamlServiceProvider();
            Type typeFromHandle3 = typeof(IProvideValueTarget);

            object[] array2 = new object[0 + 5];
            array2[0] = label;
            array2[1] = grid;
            array2[2] = grid2;
            array2[3] = scrollView;
            array2[4] = this;
            xamlServiceProvider2.Add(typeFromHandle3, new SimpleValueTargetProvider(array2, Label.FontSizeProperty));
            xamlServiceProvider2.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle4 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver2 = new XmlNamespaceResolver();

            xmlNamespaceResolver2.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver2.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver2.Add("prism", "clr-namespace:Prism.Mvvm;assembly=Prism.Forms");
            xmlNamespaceResolver2.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver2.Add("local", "clr-namespace:RFID");
            xamlServiceProvider2.Add(typeFromHandle4, new XamlTypeResolver(xmlNamespaceResolver2, typeof(DataPage).GetTypeInfo().Assembly));
            xamlServiceProvider2.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(22, 106)));
            bindableObject.SetValue(fontSizeProperty, extendedTypeConverter.ConvertFromInvariantString(value, xamlServiceProvider2));
            label.SetValue(View.HorizontalOptionsProperty, LayoutOptions.FillAndExpand);
            label.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
            label.SetValue(Label.HorizontalTextAlignmentProperty, new TextAlignmentConverter().ConvertFromInvariantString("Center"));
            grid.Children.Add(label);
            label2.SetValue(Grid.ColumnProperty, 1);
            bindingExtension2.Path = "CurLocation";
            BindingBase binding2 = ((IMarkupExtension <BindingBase>)bindingExtension2).ProvideValue(null);

            label2.SetBinding(Label.TextProperty, binding2);
            BindableObject         bindableObject2        = label2;
            BindableProperty       fontSizeProperty2      = Label.FontSizeProperty;
            IExtendedTypeConverter extendedTypeConverter2 = new FontSizeConverter();
            string value2 = "Default";
            XamlServiceProvider xamlServiceProvider3 = new XamlServiceProvider();
            Type typeFromHandle5 = typeof(IProvideValueTarget);

            object[] array3 = new object[0 + 5];
            array3[0] = label2;
            array3[1] = grid;
            array3[2] = grid2;
            array3[3] = scrollView;
            array3[4] = this;
            xamlServiceProvider3.Add(typeFromHandle5, new SimpleValueTargetProvider(array3, Label.FontSizeProperty));
            xamlServiceProvider3.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle6 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver3 = new XmlNamespaceResolver();

            xmlNamespaceResolver3.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver3.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver3.Add("prism", "clr-namespace:Prism.Mvvm;assembly=Prism.Forms");
            xmlNamespaceResolver3.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver3.Add("local", "clr-namespace:RFID");
            xamlServiceProvider3.Add(typeFromHandle6, new XamlTypeResolver(xmlNamespaceResolver3, typeof(DataPage).GetTypeInfo().Assembly));
            xamlServiceProvider3.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(23, 77)));
            bindableObject2.SetValue(fontSizeProperty2, extendedTypeConverter2.ConvertFromInvariantString(value2, xamlServiceProvider3));
            label2.SetValue(View.HorizontalOptionsProperty, LayoutOptions.FillAndExpand);
            label2.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
            grid.Children.Add(label2);
            grid2.Children.Add(grid);
            tableView.Intent = TableIntent.Form;
            tableView.SetValue(Grid.RowProperty, 1);
            tableView.SetValue(TableView.HasUnevenRowsProperty, true);
            tableView.SetValue(VisualElement.BackgroundColorProperty, new Color(0.9843137264251709, 0.9843137264251709, 0.9843137264251709, 1.0));
            translateExtension2.Text = "acar";
            IMarkupExtension    markupExtension2     = translateExtension2;
            XamlServiceProvider xamlServiceProvider4 = new XamlServiceProvider();
            Type typeFromHandle7 = typeof(IProvideValueTarget);

            object[] array4 = new object[0 + 7];
            array4[0] = newEntryCell;
            array4[1] = tableSection;
            array4[2] = tableRoot;
            array4[3] = tableView;
            array4[4] = grid2;
            array4[5] = scrollView;
            array4[6] = this;
            xamlServiceProvider4.Add(typeFromHandle7, new SimpleValueTargetProvider(array4, NewEntryCell.TitleProperty));
            xamlServiceProvider4.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle8 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver4 = new XmlNamespaceResolver();

            xmlNamespaceResolver4.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver4.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver4.Add("prism", "clr-namespace:Prism.Mvvm;assembly=Prism.Forms");
            xmlNamespaceResolver4.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver4.Add("local", "clr-namespace:RFID");
            xamlServiceProvider4.Add(typeFromHandle8, new XamlTypeResolver(xmlNamespaceResolver4, typeof(DataPage).GetTypeInfo().Assembly));
            xamlServiceProvider4.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(29, 52)));
            object title = markupExtension2.ProvideValue(xamlServiceProvider4);

            newEntryCell.Title     = title;
            bindingExtension3.Path = "CarNo";
            BindingBase binding3 = ((IMarkupExtension <BindingBase>)bindingExtension3).ProvideValue(null);

            newEntryCell.SetBinding(NewEntryCell.TextProperty, binding3);
            tableSection.Add(newEntryCell);
            translateExtension3.Text = "driver";
            IMarkupExtension    markupExtension3     = translateExtension3;
            XamlServiceProvider xamlServiceProvider5 = new XamlServiceProvider();
            Type typeFromHandle9 = typeof(IProvideValueTarget);

            object[] array5 = new object[0 + 7];
            array5[0] = newEntryCell2;
            array5[1] = tableSection;
            array5[2] = tableRoot;
            array5[3] = tableView;
            array5[4] = grid2;
            array5[5] = scrollView;
            array5[6] = this;
            xamlServiceProvider5.Add(typeFromHandle9, new SimpleValueTargetProvider(array5, NewEntryCell.TitleProperty));
            xamlServiceProvider5.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle10 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver5 = new XmlNamespaceResolver();

            xmlNamespaceResolver5.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver5.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver5.Add("prism", "clr-namespace:Prism.Mvvm;assembly=Prism.Forms");
            xmlNamespaceResolver5.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver5.Add("local", "clr-namespace:RFID");
            xamlServiceProvider5.Add(typeFromHandle10, new XamlTypeResolver(xmlNamespaceResolver5, typeof(DataPage).GetTypeInfo().Assembly));
            xamlServiceProvider5.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(30, 51)));
            object title2 = markupExtension3.ProvideValue(xamlServiceProvider5);

            newEntryCell2.Title    = title2;
            bindingExtension4.Path = "Driver";
            BindingBase binding4 = ((IMarkupExtension <BindingBase>)bindingExtension4).ProvideValue(null);

            newEntryCell2.SetBinding(NewEntryCell.TextProperty, binding4);
            tableSection.Add(newEntryCell2);
            translateExtension4.Text = "place";
            IMarkupExtension    markupExtension4     = translateExtension4;
            XamlServiceProvider xamlServiceProvider6 = new XamlServiceProvider();
            Type typeFromHandle11 = typeof(IProvideValueTarget);

            object[] array6 = new object[0 + 7];
            array6[0] = newEntryCell3;
            array6[1] = tableSection;
            array6[2] = tableRoot;
            array6[3] = tableView;
            array6[4] = grid2;
            array6[5] = scrollView;
            array6[6] = this;
            xamlServiceProvider6.Add(typeFromHandle11, new SimpleValueTargetProvider(array6, NewEntryCell.TitleProperty));
            xamlServiceProvider6.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle12 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver6 = new XmlNamespaceResolver();

            xmlNamespaceResolver6.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver6.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver6.Add("prism", "clr-namespace:Prism.Mvvm;assembly=Prism.Forms");
            xmlNamespaceResolver6.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver6.Add("local", "clr-namespace:RFID");
            xamlServiceProvider6.Add(typeFromHandle12, new XamlTypeResolver(xmlNamespaceResolver6, typeof(DataPage).GetTypeInfo().Assembly));
            xamlServiceProvider6.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(31, 52)));
            object title3 = markupExtension4.ProvideValue(xamlServiceProvider6);

            newEntryCell3.Title    = title3;
            bindingExtension5.Path = "Place";
            BindingBase binding5 = ((IMarkupExtension <BindingBase>)bindingExtension5).ProvideValue(null);

            newEntryCell3.SetBinding(NewEntryCell.TextProperty, binding5);
            tableSection.Add(newEntryCell3);
            translateExtension5.Text = "arrival";
            IMarkupExtension    markupExtension5     = translateExtension5;
            XamlServiceProvider xamlServiceProvider7 = new XamlServiceProvider();
            Type typeFromHandle13 = typeof(IProvideValueTarget);

            object[] array7 = new object[0 + 7];
            array7[0] = newEntryCell4;
            array7[1] = tableSection;
            array7[2] = tableRoot;
            array7[3] = tableView;
            array7[4] = grid2;
            array7[5] = scrollView;
            array7[6] = this;
            xamlServiceProvider7.Add(typeFromHandle13, new SimpleValueTargetProvider(array7, NewEntryCell.TitleProperty));
            xamlServiceProvider7.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle14 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver7 = new XmlNamespaceResolver();

            xmlNamespaceResolver7.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver7.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver7.Add("prism", "clr-namespace:Prism.Mvvm;assembly=Prism.Forms");
            xmlNamespaceResolver7.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver7.Add("local", "clr-namespace:RFID");
            xamlServiceProvider7.Add(typeFromHandle14, new XamlTypeResolver(xmlNamespaceResolver7, typeof(DataPage).GetTypeInfo().Assembly));
            xamlServiceProvider7.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(32, 54)));
            object title4 = markupExtension5.ProvideValue(xamlServiceProvider7);

            newEntryCell4.Title    = title4;
            bindingExtension6.Path = "Arrival";
            BindingBase binding6 = ((IMarkupExtension <BindingBase>)bindingExtension6).ProvideValue(null);

            newEntryCell4.SetBinding(NewEntryCell.TextProperty, binding6);
            translateExtension6.Text = "arrivalhint";
            IMarkupExtension    markupExtension6     = translateExtension6;
            XamlServiceProvider xamlServiceProvider8 = new XamlServiceProvider();
            Type typeFromHandle15 = typeof(IProvideValueTarget);

            object[] array8 = new object[0 + 7];
            array8[0] = newEntryCell4;
            array8[1] = tableSection;
            array8[2] = tableRoot;
            array8[3] = tableView;
            array8[4] = grid2;
            array8[5] = scrollView;
            array8[6] = this;
            xamlServiceProvider8.Add(typeFromHandle15, new SimpleValueTargetProvider(array8, NewEntryCell.HintProperty));
            xamlServiceProvider8.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle16 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver8 = new XmlNamespaceResolver();

            xmlNamespaceResolver8.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver8.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver8.Add("prism", "clr-namespace:Prism.Mvvm;assembly=Prism.Forms");
            xmlNamespaceResolver8.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver8.Add("local", "clr-namespace:RFID");
            xamlServiceProvider8.Add(typeFromHandle16, new XamlTypeResolver(xmlNamespaceResolver8, typeof(DataPage).GetTypeInfo().Assembly));
            xamlServiceProvider8.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(32, 113)));
            object hint = markupExtension6.ProvideValue(xamlServiceProvider8);

            newEntryCell4.Hint = hint;
            tableSection.Add(newEntryCell4);
            bindingExtension7.Path = "QianfengNo";
            BindingBase binding7 = ((IMarkupExtension <BindingBase>)bindingExtension7).ProvideValue(null);

            qrcodeCell.SetBinding(QRCodeCell.TextProperty, binding7);
            translateExtension7.Text = "qianfengno";
            IMarkupExtension    markupExtension7     = translateExtension7;
            XamlServiceProvider xamlServiceProvider9 = new XamlServiceProvider();
            Type typeFromHandle17 = typeof(IProvideValueTarget);

            object[] array9 = new object[0 + 7];
            array9[0] = qrcodeCell;
            array9[1] = tableSection;
            array9[2] = tableRoot;
            array9[3] = tableView;
            array9[4] = grid2;
            array9[5] = scrollView;
            array9[6] = this;
            xamlServiceProvider9.Add(typeFromHandle17, new SimpleValueTargetProvider(array9, QRCodeCell.TitleProperty));
            xamlServiceProvider9.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle18 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver9 = new XmlNamespaceResolver();

            xmlNamespaceResolver9.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver9.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver9.Add("prism", "clr-namespace:Prism.Mvvm;assembly=Prism.Forms");
            xmlNamespaceResolver9.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver9.Add("local", "clr-namespace:RFID");
            xamlServiceProvider9.Add(typeFromHandle18, new XamlTypeResolver(xmlNamespaceResolver9, typeof(DataPage).GetTypeInfo().Assembly));
            xamlServiceProvider9.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(33, 80)));
            object title5 = markupExtension7.ProvideValue(xamlServiceProvider9);

            qrcodeCell.Title         = title5;
            translateExtension8.Text = "qrcodehint";
            IMarkupExtension    markupExtension8      = translateExtension8;
            XamlServiceProvider xamlServiceProvider10 = new XamlServiceProvider();
            Type typeFromHandle19 = typeof(IProvideValueTarget);

            object[] array10 = new object[0 + 7];
            array10[0] = qrcodeCell;
            array10[1] = tableSection;
            array10[2] = tableRoot;
            array10[3] = tableView;
            array10[4] = grid2;
            array10[5] = scrollView;
            array10[6] = this;
            xamlServiceProvider10.Add(typeFromHandle19, new SimpleValueTargetProvider(array10, QRCodeCell.HintProperty));
            xamlServiceProvider10.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle20 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver10 = new XmlNamespaceResolver();

            xmlNamespaceResolver10.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver10.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver10.Add("prism", "clr-namespace:Prism.Mvvm;assembly=Prism.Forms");
            xmlNamespaceResolver10.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver10.Add("local", "clr-namespace:RFID");
            xamlServiceProvider10.Add(typeFromHandle20, new XamlTypeResolver(xmlNamespaceResolver10, typeof(DataPage).GetTypeInfo().Assembly));
            xamlServiceProvider10.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(33, 117)));
            object hint2 = markupExtension8.ProvideValue(xamlServiceProvider10);

            qrcodeCell.Hint = hint2;
            qrcodeCell.SetValue(Cell.IsEnabledProperty, true);
            tableSection.Add(qrcodeCell);
            translateExtension9.Text = "qianfengphoto";
            IMarkupExtension    markupExtension9      = translateExtension9;
            XamlServiceProvider xamlServiceProvider11 = new XamlServiceProvider();
            Type typeFromHandle21 = typeof(IProvideValueTarget);

            object[] array11 = new object[0 + 7];
            array11[0] = photoCell;
            array11[1] = tableSection;
            array11[2] = tableRoot;
            array11[3] = tableView;
            array11[4] = grid2;
            array11[5] = scrollView;
            array11[6] = this;
            xamlServiceProvider11.Add(typeFromHandle21, new SimpleValueTargetProvider(array11, PhotoCell.TitleProperty));
            xamlServiceProvider11.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle22 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver11 = new XmlNamespaceResolver();

            xmlNamespaceResolver11.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver11.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver11.Add("prism", "clr-namespace:Prism.Mvvm;assembly=Prism.Forms");
            xmlNamespaceResolver11.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver11.Add("local", "clr-namespace:RFID");
            xamlServiceProvider11.Add(typeFromHandle22, new XamlTypeResolver(xmlNamespaceResolver11, typeof(DataPage).GetTypeInfo().Assembly));
            xamlServiceProvider11.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(34, 70)));
            object title6 = markupExtension9.ProvideValue(xamlServiceProvider11);

            photoCell.Title        = title6;
            bindingExtension8.Path = "ImageFiles";
            BindingBase binding8 = ((IMarkupExtension <BindingBase>)bindingExtension8).ProvideValue(null);

            photoCell.SetBinding(PhotoCell.FilesProperty, binding8);
            photoCell.SetValue(PhotoCell.CanTakeMoreProperty, false);
            tableSection.Add(photoCell);
            tableRoot.Add(tableSection);
            tableView.Root = tableRoot;
            grid2.Children.Add(tableView);
            button.SetValue(View.MarginProperty, new Thickness(20.0));
            button.SetValue(Grid.RowProperty, 2);
            translateExtension10.Text = "shifeng";
            IMarkupExtension    markupExtension10     = translateExtension10;
            XamlServiceProvider xamlServiceProvider12 = new XamlServiceProvider();
            Type typeFromHandle23 = typeof(IProvideValueTarget);

            object[] array12 = new object[0 + 4];
            array12[0] = button;
            array12[1] = grid2;
            array12[2] = scrollView;
            array12[3] = this;
            xamlServiceProvider12.Add(typeFromHandle23, new SimpleValueTargetProvider(array12, Button.TextProperty));
            xamlServiceProvider12.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle24 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver12 = new XmlNamespaceResolver();

            xmlNamespaceResolver12.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver12.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver12.Add("prism", "clr-namespace:Prism.Mvvm;assembly=Prism.Forms");
            xmlNamespaceResolver12.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver12.Add("local", "clr-namespace:RFID");
            xamlServiceProvider12.Add(typeFromHandle24, new XamlTypeResolver(xmlNamespaceResolver12, typeof(DataPage).GetTypeInfo().Assembly));
            xamlServiceProvider12.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(40, 51)));
            object text2 = markupExtension10.ProvideValue(xamlServiceProvider12);

            button.Text            = text2;
            bindingExtension9.Path = "CommitCommand";
            BindingBase binding9 = ((IMarkupExtension <BindingBase>)bindingExtension9).ProvideValue(null);

            button.SetBinding(Button.CommandProperty, binding9);
            button.SetValue(Button.TextColorProperty, Color.White);
            button.SetValue(VisualElement.BackgroundColorProperty, new Color(0.050980392843484879, 0.27843138575553894, 0.63137257099151611, 1.0));
            button.SetValue(Button.BorderRadiusProperty, 10);
            button.SetValue(Button.BorderColorProperty, new Color(0.050980392843484879, 0.27843138575553894, 0.63137257099151611, 1.0));
            button.SetValue(Button.BorderWidthProperty, 1.0);
            grid2.Children.Add(button);
            scrollView.Content = grid2;
            this.SetValue(ContentPage.ContentProperty, scrollView);
        }
コード例 #9
0
        private void InitializeComponent()
        {
            if (ResourceLoader.ResourceProvider != null && ResourceLoader.ResourceProvider(typeof(QueryLockPage).GetTypeInfo().Assembly.GetName(), "Views/QueryLockPage.xaml") != null)
            {
                this.__InitComponentRuntime();
                return;
            }
            if (XamlLoader.XamlFileProvider != null && XamlLoader.XamlFileProvider(base.GetType()) != null)
            {
                this.__InitComponentRuntime();
                return;
            }
            BindingExtension  bindingExtension  = new BindingExtension();
            ColumnDefinition  columnDefinition  = new ColumnDefinition();
            ColumnDefinition  columnDefinition2 = new ColumnDefinition();
            RowDefinition     rowDefinition     = new RowDefinition();
            RowDefinition     rowDefinition2    = new RowDefinition();
            Label             label             = new Label();
            BindingExtension  bindingExtension2 = new BindingExtension();
            Label             label2            = new Label();
            Label             label3            = new Label();
            BindingExtension  bindingExtension3 = new BindingExtension();
            Label             label4            = new Label();
            Grid              grid = new Grid();
            BindingExtension  bindingExtension4 = new BindingExtension();
            DataTemplate      dataTemplate      = new DataTemplate();
            ListView          listView          = new ListView();
            StackLayout       stackLayout       = new StackLayout();
            BindingExtension  bindingExtension5 = new BindingExtension();
            BindingExtension  bindingExtension6 = new BindingExtension();
            ActivityIndicator activityIndicator = new ActivityIndicator();
            Grid              grid2             = new Grid();
            NameScope         nameScope         = new NameScope();

            NameScope.SetNameScope(this, nameScope);
            NameScope.SetNameScope(grid2, nameScope);
            NameScope.SetNameScope(stackLayout, nameScope);
            NameScope.SetNameScope(grid, nameScope);
            NameScope.SetNameScope(columnDefinition, nameScope);
            NameScope.SetNameScope(columnDefinition2, nameScope);
            NameScope.SetNameScope(rowDefinition, nameScope);
            NameScope.SetNameScope(rowDefinition2, nameScope);
            NameScope.SetNameScope(label, nameScope);
            NameScope.SetNameScope(label2, nameScope);
            NameScope.SetNameScope(label3, nameScope);
            NameScope.SetNameScope(label4, nameScope);
            NameScope.SetNameScope(listView, nameScope);
            ((INameScope)nameScope).RegisterName("listView", listView);
            if (listView.StyleId == null)
            {
                listView.StyleId = "listView";
            }
            NameScope.SetNameScope(activityIndicator, nameScope);
            this.listView         = listView;
            bindingExtension.Path = "Title";
            BindingBase binding = ((IMarkupExtension <BindingBase>)bindingExtension).ProvideValue(null);

            this.SetBinding(Page.TitleProperty, binding);
            stackLayout.SetValue(Xamarin.Forms.Layout.PaddingProperty, new Thickness(0.0));
            stackLayout.SetValue(StackLayout.SpacingProperty, 0.0);
            grid.SetValue(VisualElement.BackgroundColorProperty, Color.Silver);
            grid.SetValue(Grid.RowSpacingProperty, 5.0);
            grid.SetValue(Xamarin.Forms.Layout.PaddingProperty, new Thickness(10.0, 5.0, 10.0, 5.0));
            columnDefinition.SetValue(ColumnDefinition.WidthProperty, new GridLengthTypeConverter().ConvertFromInvariantString("*"));
            grid.GetValue(Grid.ColumnDefinitionsProperty).Add(columnDefinition);
            columnDefinition2.SetValue(ColumnDefinition.WidthProperty, new GridLengthTypeConverter().ConvertFromInvariantString("3*"));
            grid.GetValue(Grid.ColumnDefinitionsProperty).Add(columnDefinition2);
            rowDefinition.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("Auto"));
            grid.GetValue(Grid.RowDefinitionsProperty).Add(rowDefinition);
            rowDefinition2.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("Auto"));
            grid.GetValue(Grid.RowDefinitionsProperty).Add(rowDefinition2);
            label.SetValue(Grid.ColumnProperty, 0);
            label.SetValue(Label.TextProperty, "施封位置");
            label.SetValue(Label.TextColorProperty, new Color(0.501960813999176, 0.501960813999176, 0.501960813999176, 1.0));
            BindableObject         bindableObject        = label;
            BindableProperty       fontSizeProperty      = Label.FontSizeProperty;
            IExtendedTypeConverter extendedTypeConverter = new FontSizeConverter();
            string value = "Default";
            XamlServiceProvider xamlServiceProvider = new XamlServiceProvider();
            Type typeFromHandle = typeof(IProvideValueTarget);

            object[] array = new object[0 + 5];
            array[0] = label;
            array[1] = grid;
            array[2] = stackLayout;
            array[3] = grid2;
            array[4] = this;
            xamlServiceProvider.Add(typeFromHandle, new SimpleValueTargetProvider(array, Label.FontSizeProperty));
            xamlServiceProvider.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle2 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver = new XmlNamespaceResolver();

            xmlNamespaceResolver.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver.Add("layout", "clr-namespace:RFID.Layout");
            xamlServiceProvider.Add(typeFromHandle2, new XamlTypeResolver(xmlNamespaceResolver, typeof(QueryLockPage).GetTypeInfo().Assembly));
            xamlServiceProvider.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(17, 74)));
            bindableObject.SetValue(fontSizeProperty, extendedTypeConverter.ConvertFromInvariantString(value, xamlServiceProvider));
            label.SetValue(View.HorizontalOptionsProperty, LayoutOptions.FillAndExpand);
            label.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
            label.SetValue(Label.HorizontalTextAlignmentProperty, new TextAlignmentConverter().ConvertFromInvariantString("Start"));
            grid.Children.Add(label);
            label2.SetValue(Grid.ColumnProperty, 1);
            bindingExtension2.Path = "Place";
            BindingBase binding2 = ((IMarkupExtension <BindingBase>)bindingExtension2).ProvideValue(null);

            label2.SetBinding(Label.TextProperty, binding2);
            BindableObject         bindableObject2        = label2;
            BindableProperty       fontSizeProperty2      = Label.FontSizeProperty;
            IExtendedTypeConverter extendedTypeConverter2 = new FontSizeConverter();
            string value2 = "Default";
            XamlServiceProvider xamlServiceProvider2 = new XamlServiceProvider();
            Type typeFromHandle3 = typeof(IProvideValueTarget);

            object[] array2 = new object[0 + 5];
            array2[0] = label2;
            array2[1] = grid;
            array2[2] = stackLayout;
            array2[3] = grid2;
            array2[4] = this;
            xamlServiceProvider2.Add(typeFromHandle3, new SimpleValueTargetProvider(array2, Label.FontSizeProperty));
            xamlServiceProvider2.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle4 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver2 = new XmlNamespaceResolver();

            xmlNamespaceResolver2.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver2.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver2.Add("layout", "clr-namespace:RFID.Layout");
            xamlServiceProvider2.Add(typeFromHandle4, new XamlTypeResolver(xmlNamespaceResolver2, typeof(QueryLockPage).GetTypeInfo().Assembly));
            xamlServiceProvider2.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(18, 71)));
            bindableObject2.SetValue(fontSizeProperty2, extendedTypeConverter2.ConvertFromInvariantString(value2, xamlServiceProvider2));
            label2.SetValue(Label.TextColorProperty, Color.Black);
            label2.SetValue(View.HorizontalOptionsProperty, LayoutOptions.FillAndExpand);
            label2.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
            grid.Children.Add(label2);
            label3.SetValue(Grid.RowProperty, 1);
            label3.SetValue(Grid.ColumnProperty, 0);
            label3.SetValue(Label.TextProperty, "目的地址");
            label3.SetValue(Label.TextColorProperty, new Color(0.501960813999176, 0.501960813999176, 0.501960813999176, 1.0));
            BindableObject         bindableObject3        = label3;
            BindableProperty       fontSizeProperty3      = Label.FontSizeProperty;
            IExtendedTypeConverter extendedTypeConverter3 = new FontSizeConverter();
            string value3 = "Default";
            XamlServiceProvider xamlServiceProvider3 = new XamlServiceProvider();
            Type typeFromHandle5 = typeof(IProvideValueTarget);

            object[] array3 = new object[0 + 5];
            array3[0] = label3;
            array3[1] = grid;
            array3[2] = stackLayout;
            array3[3] = grid2;
            array3[4] = this;
            xamlServiceProvider3.Add(typeFromHandle5, new SimpleValueTargetProvider(array3, Label.FontSizeProperty));
            xamlServiceProvider3.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle6 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver3 = new XmlNamespaceResolver();

            xmlNamespaceResolver3.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver3.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver3.Add("layout", "clr-namespace:RFID.Layout");
            xamlServiceProvider3.Add(typeFromHandle6, new XamlTypeResolver(xmlNamespaceResolver3, typeof(QueryLockPage).GetTypeInfo().Assembly));
            xamlServiceProvider3.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(19, 87)));
            bindableObject3.SetValue(fontSizeProperty3, extendedTypeConverter3.ConvertFromInvariantString(value3, xamlServiceProvider3));
            label3.SetValue(View.HorizontalOptionsProperty, LayoutOptions.FillAndExpand);
            label3.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
            label3.SetValue(Label.HorizontalTextAlignmentProperty, new TextAlignmentConverter().ConvertFromInvariantString("Start"));
            grid.Children.Add(label3);
            label4.SetValue(Grid.RowProperty, 1);
            label4.SetValue(Grid.ColumnProperty, 1);
            bindingExtension3.Path = "Address";
            BindingBase binding3 = ((IMarkupExtension <BindingBase>)bindingExtension3).ProvideValue(null);

            label4.SetBinding(Label.TextProperty, binding3);
            BindableObject         bindableObject4        = label4;
            BindableProperty       fontSizeProperty4      = Label.FontSizeProperty;
            IExtendedTypeConverter extendedTypeConverter4 = new FontSizeConverter();
            string value4 = "Default";
            XamlServiceProvider xamlServiceProvider4 = new XamlServiceProvider();
            Type typeFromHandle7 = typeof(IProvideValueTarget);

            object[] array4 = new object[0 + 5];
            array4[0] = label4;
            array4[1] = grid;
            array4[2] = stackLayout;
            array4[3] = grid2;
            array4[4] = this;
            xamlServiceProvider4.Add(typeFromHandle7, new SimpleValueTargetProvider(array4, Label.FontSizeProperty));
            xamlServiceProvider4.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle8 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver4 = new XmlNamespaceResolver();

            xmlNamespaceResolver4.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver4.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver4.Add("layout", "clr-namespace:RFID.Layout");
            xamlServiceProvider4.Add(typeFromHandle8, new XamlTypeResolver(xmlNamespaceResolver4, typeof(QueryLockPage).GetTypeInfo().Assembly));
            xamlServiceProvider4.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(20, 86)));
            bindableObject4.SetValue(fontSizeProperty4, extendedTypeConverter4.ConvertFromInvariantString(value4, xamlServiceProvider4));
            label4.SetValue(Label.TextColorProperty, Color.Black);
            label4.SetValue(View.HorizontalOptionsProperty, LayoutOptions.FillAndExpand);
            label4.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
            grid.Children.Add(label4);
            stackLayout.Children.Add(grid);
            listView.SetValue(ListView.SelectionModeProperty, ListViewSelectionMode.None);
            bindingExtension4.Path = "Queries";
            BindingBase binding4 = ((IMarkupExtension <BindingBase>)bindingExtension4).ProvideValue(null);

            listView.SetBinding(ItemsView <Cell> .ItemsSourceProperty, binding4);
            listView.SetValue(ListView.HasUnevenRowsProperty, true);
            IDataTemplate dataTemplate2 = dataTemplate;

            QueryLockPage.< InitializeComponent > _anonXamlCDataTemplate_2 <InitializeComponent> _anonXamlCDataTemplate_ = new QueryLockPage.< InitializeComponent > _anonXamlCDataTemplate_2();
            object[]        array5 = new object[0 + 5];
            array5[0] = dataTemplate;
            array5[1] = listView;
            array5[2] = stackLayout;
            array5[3] = grid2;
            array5[4] = this;
コード例 #10
0
 private static void SetRowActualHeight(RowDefinition d, double value)
 {
     d.SetValue(RowActualHeightPropertyKey, value);
 }
コード例 #11
0
        private void InitializeComponent()
        {
            if (ResourceLoader.ResourceProvider != null && ResourceLoader.ResourceProvider(typeof(MainPage).GetTypeInfo().Assembly.GetName(), "Views/MainPage.xaml") != null)
            {
                this.__InitComponentRuntime();
                return;
            }
            if (XamlLoader.XamlFileProvider != null && XamlLoader.XamlFileProvider(base.GetType()) != null)
            {
                this.__InitComponentRuntime();
                return;
            }
            BindingExtension     bindingExtension     = new BindingExtension();
            BindingExtension     bindingExtension2    = new BindingExtension();
            RowDefinition        rowDefinition        = new RowDefinition();
            RowDefinition        rowDefinition2       = new RowDefinition();
            RowDefinition        rowDefinition3       = new RowDefinition();
            RowDefinition        rowDefinition4       = new RowDefinition();
            ColumnDefinition     columnDefinition     = new ColumnDefinition();
            ColumnDefinition     columnDefinition2    = new ColumnDefinition();
            Image                image                = new Image();
            TranslateExtension   translateExtension   = new TranslateExtension();
            BindingExtension     bindingExtension3    = new BindingExtension();
            FuncView             funcView             = new FuncView();
            TranslateExtension   translateExtension2  = new TranslateExtension();
            BindingExtension     bindingExtension4    = new BindingExtension();
            FuncView             funcView2            = new FuncView();
            TranslateExtension   translateExtension3  = new TranslateExtension();
            BindingExtension     bindingExtension5    = new BindingExtension();
            FuncView             funcView3            = new FuncView();
            TranslateExtension   translateExtension4  = new TranslateExtension();
            BindingExtension     bindingExtension6    = new BindingExtension();
            FuncView             funcView4            = new FuncView();
            BindingExtension     bindingExtension7    = new BindingExtension();
            BindingExtension     bindingExtension8    = new BindingExtension();
            TapGestureRecognizer tapGestureRecognizer = new TapGestureRecognizer();
            Label                label                = new Label();
            Grid              grid               = new Grid();
            Grid              grid2              = new Grid();
            BindingExtension  bindingExtension9  = new BindingExtension();
            BindingExtension  bindingExtension10 = new BindingExtension();
            ActivityIndicator activityIndicator  = new ActivityIndicator();
            Grid              grid3              = new Grid();
            NameScope         nameScope          = new NameScope();

            NameScope.SetNameScope(this, nameScope);
            NameScope.SetNameScope(grid3, nameScope);
            NameScope.SetNameScope(grid2, nameScope);
            NameScope.SetNameScope(rowDefinition, nameScope);
            NameScope.SetNameScope(rowDefinition2, nameScope);
            NameScope.SetNameScope(rowDefinition3, nameScope);
            NameScope.SetNameScope(rowDefinition4, nameScope);
            NameScope.SetNameScope(columnDefinition, nameScope);
            NameScope.SetNameScope(columnDefinition2, nameScope);
            NameScope.SetNameScope(image, nameScope);
            NameScope.SetNameScope(funcView, nameScope);
            NameScope.SetNameScope(funcView2, nameScope);
            NameScope.SetNameScope(funcView3, nameScope);
            NameScope.SetNameScope(funcView4, nameScope);
            NameScope.SetNameScope(grid, nameScope);
            NameScope.SetNameScope(label, nameScope);
            NameScope.SetNameScope(tapGestureRecognizer, nameScope);
            NameScope.SetNameScope(activityIndicator, nameScope);
            bindingExtension.Path = "Title";
            BindingBase binding = ((IMarkupExtension <BindingBase>)bindingExtension).ProvideValue(null);

            this.SetBinding(Page.TitleProperty, binding);
            bindingExtension2.Path = "HasTitle";
            BindingBase binding2 = ((IMarkupExtension <BindingBase>)bindingExtension2).ProvideValue(null);

            this.SetBinding(NavigationPage.HasNavigationBarProperty, binding2);
            grid3.SetValue(VisualElement.BackgroundColorProperty, new Color(0.98039215803146362, 0.98039215803146362, 0.98039215803146362, 1.0));
            grid2.SetValue(Grid.RowSpacingProperty, 1.0);
            grid2.SetValue(Grid.ColumnSpacingProperty, 1.0);
            rowDefinition.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("*"));
            grid2.GetValue(Grid.RowDefinitionsProperty).Add(rowDefinition);
            rowDefinition2.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("Auto"));
            grid2.GetValue(Grid.RowDefinitionsProperty).Add(rowDefinition2);
            rowDefinition3.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("Auto"));
            grid2.GetValue(Grid.RowDefinitionsProperty).Add(rowDefinition3);
            rowDefinition4.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("Auto"));
            grid2.GetValue(Grid.RowDefinitionsProperty).Add(rowDefinition4);
            columnDefinition.SetValue(ColumnDefinition.WidthProperty, new GridLengthTypeConverter().ConvertFromInvariantString("*"));
            grid2.GetValue(Grid.ColumnDefinitionsProperty).Add(columnDefinition);
            columnDefinition2.SetValue(ColumnDefinition.WidthProperty, new GridLengthTypeConverter().ConvertFromInvariantString("*"));
            grid2.GetValue(Grid.ColumnDefinitionsProperty).Add(columnDefinition2);
            image.SetValue(Image.SourceProperty, new ImageSourceConverter().ConvertFromInvariantString("login_bg2.png"));
            image.SetValue(Grid.RowProperty, 0);
            image.SetValue(Grid.ColumnProperty, 0);
            image.SetValue(Grid.ColumnSpanProperty, 2);
            image.SetValue(Image.AspectProperty, Aspect.AspectFill);
            image.SetValue(View.HorizontalOptionsProperty, LayoutOptions.FillAndExpand);
            grid2.Children.Add(image);
            funcView.SetValue(Grid.RowProperty, 1);
            funcView.SetValue(Grid.ColumnProperty, 0);
            funcView.SetValue(VisualElement.BackgroundColorProperty, Color.White);
            translateExtension.Text = "read";
            IMarkupExtension    markupExtension     = translateExtension;
            XamlServiceProvider xamlServiceProvider = new XamlServiceProvider();
            Type typeFromHandle = typeof(IProvideValueTarget);

            object[] array = new object[0 + 4];
            array[0] = funcView;
            array[1] = grid2;
            array[2] = grid3;
            array[3] = this;
            xamlServiceProvider.Add(typeFromHandle, new SimpleValueTargetProvider(array, FuncView.TitleProperty));
            xamlServiceProvider.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle2 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver = new XmlNamespaceResolver();

            xmlNamespaceResolver.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver.Add("local", "clr-namespace:RFID");
            xamlServiceProvider.Add(typeFromHandle2, new XamlTypeResolver(xmlNamespaceResolver, typeof(MainPage).GetTypeInfo().Assembly));
            xamlServiceProvider.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(43, 87)));
            object title = markupExtension.ProvideValue(xamlServiceProvider);

            funcView.Title = title;
            funcView.SetValue(FuncView.IconProperty, "read.svg");
            bindingExtension3.Path = "ReadCommand";
            BindingBase binding3 = ((IMarkupExtension <BindingBase>)bindingExtension3).ProvideValue(null);

            funcView.SetBinding(FuncView.CommandProperty, binding3);
            grid2.Children.Add(funcView);
            funcView2.SetValue(Grid.RowProperty, 1);
            funcView2.SetValue(Grid.ColumnProperty, 1);
            funcView2.SetValue(VisualElement.BackgroundColorProperty, Color.White);
            translateExtension2.Text = "upload";
            IMarkupExtension    markupExtension2     = translateExtension2;
            XamlServiceProvider xamlServiceProvider2 = new XamlServiceProvider();
            Type typeFromHandle3 = typeof(IProvideValueTarget);

            object[] array2 = new object[0 + 4];
            array2[0] = funcView2;
            array2[1] = grid2;
            array2[2] = grid3;
            array2[3] = this;
            xamlServiceProvider2.Add(typeFromHandle3, new SimpleValueTargetProvider(array2, FuncView.TitleProperty));
            xamlServiceProvider2.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle4 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver2 = new XmlNamespaceResolver();

            xmlNamespaceResolver2.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver2.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver2.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver2.Add("local", "clr-namespace:RFID");
            xamlServiceProvider2.Add(typeFromHandle4, new XamlTypeResolver(xmlNamespaceResolver2, typeof(MainPage).GetTypeInfo().Assembly));
            xamlServiceProvider2.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(44, 88)));
            object title2 = markupExtension2.ProvideValue(xamlServiceProvider2);

            funcView2.Title = title2;
            funcView2.SetValue(FuncView.IconProperty, "upload.svg");
            bindingExtension4.Path = "UploadCommand";
            BindingBase binding4 = ((IMarkupExtension <BindingBase>)bindingExtension4).ProvideValue(null);

            funcView2.SetBinding(FuncView.CommandProperty, binding4);
            grid2.Children.Add(funcView2);
            funcView3.SetValue(Grid.RowProperty, 2);
            funcView3.SetValue(Grid.ColumnProperty, 0);
            funcView3.SetValue(VisualElement.BackgroundColorProperty, Color.White);
            translateExtension3.Text = "delete";
            IMarkupExtension    markupExtension3     = translateExtension3;
            XamlServiceProvider xamlServiceProvider3 = new XamlServiceProvider();
            Type typeFromHandle5 = typeof(IProvideValueTarget);

            object[] array3 = new object[0 + 4];
            array3[0] = funcView3;
            array3[1] = grid2;
            array3[2] = grid3;
            array3[3] = this;
            xamlServiceProvider3.Add(typeFromHandle5, new SimpleValueTargetProvider(array3, FuncView.TitleProperty));
            xamlServiceProvider3.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle6 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver3 = new XmlNamespaceResolver();

            xmlNamespaceResolver3.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver3.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver3.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver3.Add("local", "clr-namespace:RFID");
            xamlServiceProvider3.Add(typeFromHandle6, new XamlTypeResolver(xmlNamespaceResolver3, typeof(MainPage).GetTypeInfo().Assembly));
            xamlServiceProvider3.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(45, 88)));
            object title3 = markupExtension3.ProvideValue(xamlServiceProvider3);

            funcView3.Title = title3;
            funcView3.SetValue(FuncView.IconProperty, "delete.svg");
            bindingExtension5.Path = "DeleteCommand";
            BindingBase binding5 = ((IMarkupExtension <BindingBase>)bindingExtension5).ProvideValue(null);

            funcView3.SetBinding(FuncView.CommandProperty, binding5);
            grid2.Children.Add(funcView3);
            funcView4.SetValue(Grid.RowProperty, 2);
            funcView4.SetValue(Grid.ColumnProperty, 1);
            funcView4.SetValue(VisualElement.BackgroundColorProperty, Color.White);
            translateExtension4.Text = "exception";
            IMarkupExtension    markupExtension4     = translateExtension4;
            XamlServiceProvider xamlServiceProvider4 = new XamlServiceProvider();
            Type typeFromHandle7 = typeof(IProvideValueTarget);

            object[] array4 = new object[0 + 4];
            array4[0] = funcView4;
            array4[1] = grid2;
            array4[2] = grid3;
            array4[3] = this;
            xamlServiceProvider4.Add(typeFromHandle7, new SimpleValueTargetProvider(array4, FuncView.TitleProperty));
            xamlServiceProvider4.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle8 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver4 = new XmlNamespaceResolver();

            xmlNamespaceResolver4.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver4.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver4.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver4.Add("local", "clr-namespace:RFID");
            xamlServiceProvider4.Add(typeFromHandle8, new XamlTypeResolver(xmlNamespaceResolver4, typeof(MainPage).GetTypeInfo().Assembly));
            xamlServiceProvider4.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(46, 88)));
            object title4 = markupExtension4.ProvideValue(xamlServiceProvider4);

            funcView4.Title = title4;
            funcView4.SetValue(FuncView.IconProperty, "exception.svg");
            bindingExtension6.Path = "ExceptionCommand";
            BindingBase binding6 = ((IMarkupExtension <BindingBase>)bindingExtension6).ProvideValue(null);

            funcView4.SetBinding(FuncView.CommandProperty, binding6);
            grid2.Children.Add(funcView4);
            grid.SetValue(Grid.RowProperty, 3);
            grid.SetValue(Grid.ColumnProperty, 0);
            grid.SetValue(Grid.ColumnSpanProperty, 2);
            grid.SetValue(View.HorizontalOptionsProperty, LayoutOptions.FillAndExpand);
            grid.SetValue(VisualElement.BackgroundColorProperty, Color.White);
            grid.SetValue(View.VerticalOptionsProperty, LayoutOptions.End);
            label.SetValue(VisualElement.HeightRequestProperty, 80.0);
            label.SetValue(VisualElement.BackgroundColorProperty, Color.White);
            label.SetValue(Label.TextColorProperty, Color.Black);
            BindableObject         bindableObject        = label;
            BindableProperty       fontSizeProperty      = Label.FontSizeProperty;
            IExtendedTypeConverter extendedTypeConverter = new FontSizeConverter();
            string value = "Default";
            XamlServiceProvider xamlServiceProvider5 = new XamlServiceProvider();
            Type typeFromHandle9 = typeof(IProvideValueTarget);

            object[] array5 = new object[0 + 5];
            array5[0] = label;
            array5[1] = grid;
            array5[2] = grid2;
            array5[3] = grid3;
            array5[4] = this;
            xamlServiceProvider5.Add(typeFromHandle9, new SimpleValueTargetProvider(array5, Label.FontSizeProperty));
            xamlServiceProvider5.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle10 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver5 = new XmlNamespaceResolver();

            xmlNamespaceResolver5.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver5.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver5.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver5.Add("local", "clr-namespace:RFID");
            xamlServiceProvider5.Add(typeFromHandle10, new XamlTypeResolver(xmlNamespaceResolver5, typeof(MainPage).GetTypeInfo().Assembly));
            xamlServiceProvider5.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(48, 89)));
            bindableObject.SetValue(fontSizeProperty, extendedTypeConverter.ConvertFromInvariantString(value, xamlServiceProvider5));
            label.SetValue(Label.HorizontalTextAlignmentProperty, new TextAlignmentConverter().ConvertFromInvariantString("Center"));
            label.SetValue(Label.VerticalTextAlignmentProperty, new TextAlignmentConverter().ConvertFromInvariantString("Center"));
            label.SetValue(View.HorizontalOptionsProperty, LayoutOptions.Center);
            label.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
            bindingExtension7.Path = "ScanModeText";
            BindingBase binding7 = ((IMarkupExtension <BindingBase>)bindingExtension7).ProvideValue(null);

            label.SetBinding(Label.TextProperty, binding7);
            bindingExtension8.Path = "ScanModeCommand";
            BindingBase binding8 = ((IMarkupExtension <BindingBase>)bindingExtension8).ProvideValue(null);

            tapGestureRecognizer.SetBinding(TapGestureRecognizer.CommandProperty, binding8);
            label.GestureRecognizers.Add(tapGestureRecognizer);
            grid.Children.Add(label);
            grid2.Children.Add(grid);
            grid3.Children.Add(grid2);
            bindingExtension9.Path = "IsBusy";
            BindingBase binding9 = ((IMarkupExtension <BindingBase>)bindingExtension9).ProvideValue(null);

            activityIndicator.SetBinding(ActivityIndicator.IsRunningProperty, binding9);
            bindingExtension10.Path = "IsBusy";
            BindingBase binding10 = ((IMarkupExtension <BindingBase>)bindingExtension10).ProvideValue(null);

            activityIndicator.SetBinding(VisualElement.IsVisibleProperty, binding10);
            activityIndicator.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
            activityIndicator.SetValue(View.HorizontalOptionsProperty, LayoutOptions.Center);
            grid3.Children.Add(activityIndicator);
            this.SetValue(ContentPage.ContentProperty, grid3);
        }
コード例 #12
0
        /// <inheritdoc/>
        public override void AddControls()
        {
            Grid content = new Grid()
            {
                HorizontalAlignment = HorizontalAlignment.Stretch,
            };

            RowDefinition mainRow = new RowDefinition()
            {
                Height = new GridLength(1, GridUnitType.Star)
            };

            RowDefinition buttonsRow = new RowDefinition()
            {
                Height = new GridLength(1, GridUnitType.Star)
            };

            // binding

            content.RowDefinitions.Add(mainRow);
            content.RowDefinitions.Add(buttonsRow);

            ScrollViewer mainScrollView = new ScrollViewer()
            {
                VerticalScrollBarVisibility = ScrollBarVisibility.Auto,
                VerticalScrollMode          = ScrollMode.Enabled
            };

            Grid.SetRow(mainScrollView, 0);

            mainContent            = new RelativePanel();
            mainScrollView.Content = mainContent;

            content.Children.Add(mainScrollView);



            Grid buttonsPart = new Grid();

            Grid.SetRow(buttonsPart, 1);

            ColumnDefinition col1 = new ColumnDefinition()
            {
                Width = new GridLength(1, GridUnitType.Star)
            };

            ColumnDefinition col2 = new ColumnDefinition()
            {
                Width = new GridLength(1, GridUnitType.Star)
            };

            buttonsPart.ColumnDefinitions.Add(col1);
            buttonsPart.ColumnDefinitions.Add(col2);

            RowDefinition AddCloseRow = new RowDefinition();

            AddCloseRow.SetValue(NameProperty, nameof(AddCloseRow));

            RowDefinition row2 = new RowDefinition()
            {
                Height = new GridLength(1, GridUnitType.Star)
            };

            buttonsPart.RowDefinitions.Add(AddCloseRow);
            buttonsPart.RowDefinitions.Add(row2);

            Button AddClose = new Button()
            {
                Name                = nameof(AddClose),
                Margin              = new Thickness(0, 0, 0, 1),
                FontSize            = 15,
                HorizontalAlignment = HorizontalAlignment.Stretch,
                VerticalAlignment   = VerticalAlignment.Stretch,
                Command             = (DataContext as ViewModelBase).GetPropertyValue("SaveItemCloseCommand") as ICommand,
                CommandParameter    = (DataContext as ViewModelBase).GetPropertyValue("AddEditItem")
            };

            Grid.SetRow(AddClose, 0);
            Grid.SetColumnSpan(AddClose, 2);

            Binding addCloseRowHeightBinding = new Binding()
            {
                Path                = new PropertyPath(nameof(Button.Visibility)),
                ElementName         = nameof(AddClose),
                Mode                = BindingMode.OneWay,
                UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged,
                Converter           = new VisibilityToGridLength()
            };

            BindingOperations.SetBinding(AddCloseRow, RowDefinition.HeightProperty, addCloseRowHeightBinding);

            Binding gridRowHeightBinding = new Binding()
            {
                Path                = new PropertyPath(nameof(Button.Visibility)),
                ElementName         = nameof(AddClose),
                Mode                = BindingMode.OneWay,
                UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged,
                Converter           = new AddCloseVisibilityConverter()
            };

            BindingOperations.SetBinding(buttonsRow, RowDefinition.HeightProperty, gridRowHeightBinding);

            Binding addCloseVisibilityBinding = new Binding()
            {
                Source = ((DataContext as ViewModelBase).GetPropertyValue("AddEditItem") as AtomicItem).Id,
                Mode   = BindingMode.OneWay,
                UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged,
                Converter           = new IdConverter(),
                ConverterParameter  = "visibility"
            };

            BindingOperations.SetBinding(AddClose, Button.VisibilityProperty, addCloseVisibilityBinding);
            ApplicationBase.Current.PropertyChangedNotifier.RegisterProperty(AddClose, Button.VisibilityProperty, "AddEditItem", viewModelType, "Id", converter: new IdConverter(), converterParameter: "visibility");

            StackPanel addCloseContent = new StackPanel()
            {
                Orientation = Orientation.Horizontal
            };

            SymbolIcon addCloseIcon = new SymbolIcon(Symbol.SaveLocal)
            {
                Margin = new Thickness(0, 0, 10, 0)
            };

            TextBlock addCloseText = new TextBlock()
            {
                Text = "Add and Close"
            };

            addCloseContent.Children.Add(addCloseIcon);
            addCloseContent.Children.Add(addCloseText);
            AddClose.Content = addCloseContent;

            ToolTipService.SetToolTip(AddClose, "Add and Close (Ctrl + Shift + S)");

            KeyboardAccelerator addCloseKeyboardAccelerator = new KeyboardAccelerator()
            {
                Key       = VirtualKey.S,
                Modifiers = VirtualKeyModifiers.Control | VirtualKeyModifiers.Shift
            };

            AddClose.KeyboardAccelerators.Add(addCloseKeyboardAccelerator);

            Button Add = new Button()
            {
                Name                = nameof(Add),
                Margin              = new Thickness(0, 1, 1, 1),
                FontSize            = 15,
                IsEnabled           = true,
                HorizontalAlignment = HorizontalAlignment.Stretch,
                VerticalAlignment   = VerticalAlignment.Stretch,
                Command             = (DataContext as ViewModelBase).GetPropertyValue("SaveItemCommand") as ICommand,
                CommandParameter    = (DataContext as ViewModelBase).GetPropertyValue("AddEditItem")
            };

            Grid.SetRow(Add, 1);
            Grid.SetColumn(Add, 0);

            StackPanel addContent = new StackPanel()
            {
                Orientation = Orientation.Horizontal
            };

            SymbolIcon addIcon = new SymbolIcon(Symbol.Save)
            {
                Margin = new Thickness(0, 0, 10, 0)
            };

            TextBlock AddText = new TextBlock()
            {
                Name = nameof(AddText)
            };

            Binding addTextBinding = new Binding()
            {
                Source = ((DataContext as ViewModelBase).GetPropertyValue("AddEditItem") as AtomicItem).Id,
                Mode   = BindingMode.OneWay,
                UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged,
                Converter           = new IdConverter(),
                ConverterParameter  = "text"
            };

            BindingOperations.SetBinding(AddText, TextBlock.TextProperty, addTextBinding);
            ApplicationBase.Current.PropertyChangedNotifier.RegisterProperty(AddText, TextBlock.TextProperty, "AddEditItem", viewModelType, "Id", converter: new IdConverter(), converterParameter: "text");

            addContent.Children.Add(addIcon);
            addContent.Children.Add(AddText);
            Add.Content = addContent;
            ToolTipService.SetToolTip(Add, "Add (Ctrl + S)");

            KeyboardAccelerator addKeyboardAccelerator = new KeyboardAccelerator()
            {
                Key       = VirtualKey.S,
                Modifiers = VirtualKeyModifiers.Control
            };

            Add.KeyboardAccelerators.Add(addKeyboardAccelerator);

            Button Cancel = new Button()
            {
                Name                = nameof(Cancel),
                Margin              = new Thickness(1, 1, 0, 1),
                FontSize            = 15,
                IsEnabled           = true,
                HorizontalAlignment = HorizontalAlignment.Stretch,
                VerticalAlignment   = VerticalAlignment.Stretch,
                Command             = (DataContext as ViewModelBase).GetPropertyValue("Close") as ICommand
            };

            Grid.SetRow(Cancel, 1);
            Grid.SetColumn(Cancel, 1);

            StackPanel cancelContent = new StackPanel()
            {
                Orientation = Orientation.Horizontal
            };

            SymbolIcon cancelIcon = new SymbolIcon(Symbol.Cancel)
            {
                Margin = new Thickness(0, 0, 10, 0)
            };

            TextBlock cancelText = new TextBlock()
            {
                Text = "Cancel"
            };

            cancelContent.Children.Add(cancelIcon);
            cancelContent.Children.Add(cancelText);
            Cancel.Content = cancelContent;
            ToolTipService.SetToolTip(Cancel, "Cancel (Esc)");

            KeyboardAccelerator cancelKeyboardAccelerator = new KeyboardAccelerator()
            {
                Key = VirtualKey.Escape
            };

            Cancel.KeyboardAccelerators.Add(cancelKeyboardAccelerator);

            buttonsPart.Children.Add(AddClose);
            buttonsPart.Children.Add(Add);
            buttonsPart.Children.Add(Cancel);
            content.Children.Add(buttonsPart);

            Content = content;
        }
コード例 #13
0
        private void InitializeComponent()
        {
            if (ResourceLoader.CanProvideContentFor(new ResourceLoader.ResourceLoadingQuery
            {
                AssemblyName = typeof(TutorialPage).GetTypeInfo().Assembly.GetName(),
                ResourcePath = "Views/TutorialPage.xaml",
                Instance = this
            }))
            {
                __InitComponentRuntime();
                return;
            }
            if (XamlLoader.XamlFileProvider != null && XamlLoader.XamlFileProvider(GetType()) != null)
            {
                __InitComponentRuntime();
                return;
            }
            IndexConverter          value                    = new IndexConverter();
            NegateBooleanConverter  value2                   = new NegateBooleanConverter();
            ResourceDictionary      resourceDictionary       = new ResourceDictionary();
            RowDefinition           rowDefinition            = new RowDefinition();
            RowDefinition           rowDefinition2           = new RowDefinition();
            RowDefinition           rowDefinition3           = new RowDefinition();
            StaticResourceExtension staticResourceExtension  = new StaticResourceExtension();
            StaticResourceExtension staticResourceExtension2 = new StaticResourceExtension();
            Label label = new Label();
            StaticResourceExtension staticResourceExtension3 = new StaticResourceExtension();
            StaticResourceExtension staticResourceExtension4 = new StaticResourceExtension();
            Type           typeFromHandle = typeof(ContentView);
            Image          image          = new Image();
            ContentView    contentView    = new ContentView();
            Image          image2         = new Image();
            ContentView    contentView2   = new ContentView();
            Image          image3         = new Image();
            ContentView    contentView3   = new ContentView();
            Image          image4         = new Image();
            ContentView    contentView4   = new ContentView();
            ArrayExtension arrayExtension;

            (arrayExtension = new ArrayExtension()).Type = typeFromHandle;
            VisualDiagnostics.RegisterSourceInfo(typeFromHandle, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 35, 26);
            contentView.SetValue(View.MarginProperty, new Thickness(30.0, 0.0));
            contentView.SetValue(View.VerticalOptionsProperty, LayoutOptions.StartAndExpand);
            image.SetValue(Image.AspectProperty, Aspect.AspectFit);
            image.SetValue(Image.SourceProperty, new ImageSourceConverter().ConvertFromInvariantString("tuto_prochainarret.png"));
            contentView.SetValue(ContentView.ContentProperty, image);
            VisualDiagnostics.RegisterSourceInfo(image, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 38, 26);
            arrayExtension.Items.Add(contentView);
            VisualDiagnostics.RegisterSourceInfo(contentView, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 36, 22);
            contentView2.SetValue(View.MarginProperty, new Thickness(30.0, 0.0));
            contentView2.SetValue(View.VerticalOptionsProperty, LayoutOptions.StartAndExpand);
            image2.SetValue(Image.AspectProperty, Aspect.AspectFit);
            image2.SetValue(Image.SourceProperty, new ImageSourceConverter().ConvertFromInvariantString("tuto_filtre.png"));
            contentView2.SetValue(ContentView.ContentProperty, image2);
            VisualDiagnostics.RegisterSourceInfo(image2, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 44, 26);
            arrayExtension.Items.Add(contentView2);
            VisualDiagnostics.RegisterSourceInfo(contentView2, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 42, 22);
            contentView3.SetValue(View.MarginProperty, new Thickness(30.0, 0.0));
            contentView3.SetValue(View.VerticalOptionsProperty, LayoutOptions.StartAndExpand);
            image3.SetValue(Image.AspectProperty, Aspect.AspectFit);
            image3.SetValue(Image.SourceProperty, new ImageSourceConverter().ConvertFromInvariantString("tuto_favoris.png"));
            contentView3.SetValue(ContentView.ContentProperty, image3);
            VisualDiagnostics.RegisterSourceInfo(image3, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 50, 26);
            arrayExtension.Items.Add(contentView3);
            VisualDiagnostics.RegisterSourceInfo(contentView3, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 48, 22);
            contentView4.SetValue(View.MarginProperty, new Thickness(30.0, 0.0));
            contentView4.SetValue(View.VerticalOptionsProperty, LayoutOptions.StartAndExpand);
            image4.SetValue(Image.AspectProperty, Aspect.AspectFit);
            image4.SetValue(Image.SourceProperty, new ImageSourceConverter().ConvertFromInvariantString("tuto_directions.png"));
            contentView4.SetValue(ContentView.ContentProperty, image4);
            VisualDiagnostics.RegisterSourceInfo(image4, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 56, 26);
            arrayExtension.Items.Add(contentView4);
            VisualDiagnostics.RegisterSourceInfo(contentView4, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 54, 22);
            ContentView[] array = new ContentView[4]
            {
                contentView,
                contentView2,
                contentView3,
                contentView4
            };
            RadSlideView            radSlideView             = new RadSlideView();
            StaticResourceExtension staticResourceExtension5 = new StaticResourceExtension();
            StaticResourceExtension staticResourceExtension6 = new StaticResourceExtension();
            StaticResourceExtension staticResourceExtension7 = new StaticResourceExtension();
            ReferenceExtension      referenceExtension       = new ReferenceExtension();
            BindingExtension        bindingExtension         = new BindingExtension();
            BindingExtension        bindingExtension2        = new BindingExtension();
            Setter setter  = new Setter();
            Setter setter2 = new Setter();
            StaticResourceExtension staticResourceExtension8 = new StaticResourceExtension();
            Setter       setter3     = new Setter();
            DataTrigger  dataTrigger = new DataTrigger(typeof(RadButton));
            RadButton    radButton   = new RadButton();
            Grid         grid        = new Grid();
            TutorialPage tutorialPage;
            NameScope    nameScope = (NameScope)(NameScope.GetNameScope(tutorialPage = this) ?? new NameScope());

            NameScope.SetNameScope(tutorialPage, nameScope);
            ((INameScope)nameScope).RegisterName("This", (object)tutorialPage);
            if (tutorialPage.StyleId == null)
            {
                tutorialPage.StyleId = "This";
            }
            ((INameScope)nameScope).RegisterName("slideView", (object)radSlideView);
            if (radSlideView.StyleId == null)
            {
                radSlideView.StyleId = "slideView";
            }
            This      = tutorialPage;
            slideView = radSlideView;
            tutorialPage.Resources = resourceDictionary;
            VisualDiagnostics.RegisterSourceInfo(resourceDictionary, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 10, 10);
            resourceDictionary.Add("indexConverter", value);
            resourceDictionary.Add("inverter", value2);
            tutorialPage.Resources = resourceDictionary;
            VisualDiagnostics.RegisterSourceInfo(resourceDictionary, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 10, 10);
            rowDefinition.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("50"));
            ((DefinitionCollection <RowDefinition>)grid.GetValue(Grid.RowDefinitionsProperty)).Add(rowDefinition);
            rowDefinition2.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("*"));
            ((DefinitionCollection <RowDefinition>)grid.GetValue(Grid.RowDefinitionsProperty)).Add(rowDefinition2);
            rowDefinition3.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("70"));
            ((DefinitionCollection <RowDefinition>)grid.GetValue(Grid.RowDefinitionsProperty)).Add(rowDefinition3);
            label.SetValue(Label.TextProperty, "TUTORIEL");
            staticResourceExtension.Key = "DarkGrayColor";
            XamlServiceProvider xamlServiceProvider = new XamlServiceProvider();
            Type typeFromHandle2 = typeof(IProvideValueTarget);

            object[] array2 = new object[0 + 3];
            array2[0] = label;
            array2[1] = grid;
            array2[2] = tutorialPage;
            object service;

            xamlServiceProvider.Add(typeFromHandle2, service = new SimpleValueTargetProvider(array2, Label.TextColorProperty, nameScope));
            xamlServiceProvider.Add(typeof(IReferenceProvider), service);
            Type typeFromHandle3 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver = new XmlNamespaceResolver();

            xmlNamespaceResolver.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver.Add("mvvm", "clr-namespace:AntilopeGP.Shared.MVVM");
            xmlNamespaceResolver.Add("telerikPrimitives", "clr-namespace:Telerik.XamarinForms.Primitives;assembly=Telerik.XamarinForms.Primitives");
            xmlNamespaceResolver.Add("telerikInput", "clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.XamarinForms.Input");
            xamlServiceProvider.Add(typeFromHandle3, new XamlTypeResolver(xmlNamespaceResolver, typeof(TutorialPage).GetTypeInfo().Assembly));
            xamlServiceProvider.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(22, 16)));
            object obj = ((IMarkupExtension)staticResourceExtension).ProvideValue((IServiceProvider)xamlServiceProvider);

            label.TextColor = (Color)obj;
            VisualDiagnostics.RegisterSourceInfo(obj, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 22, 16);
            staticResourceExtension2.Key = "TCLBold";
            XamlServiceProvider xamlServiceProvider2 = new XamlServiceProvider();
            Type typeFromHandle4 = typeof(IProvideValueTarget);

            object[] array3 = new object[0 + 3];
            array3[0] = label;
            array3[1] = grid;
            array3[2] = tutorialPage;
            object service2;

            xamlServiceProvider2.Add(typeFromHandle4, service2 = new SimpleValueTargetProvider(array3, Label.FontFamilyProperty, nameScope));
            xamlServiceProvider2.Add(typeof(IReferenceProvider), service2);
            Type typeFromHandle5 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver2 = new XmlNamespaceResolver();

            xmlNamespaceResolver2.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver2.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver2.Add("mvvm", "clr-namespace:AntilopeGP.Shared.MVVM");
            xmlNamespaceResolver2.Add("telerikPrimitives", "clr-namespace:Telerik.XamarinForms.Primitives;assembly=Telerik.XamarinForms.Primitives");
            xmlNamespaceResolver2.Add("telerikInput", "clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.XamarinForms.Input");
            xamlServiceProvider2.Add(typeFromHandle5, new XamlTypeResolver(xmlNamespaceResolver2, typeof(TutorialPage).GetTypeInfo().Assembly));
            xamlServiceProvider2.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(23, 16)));
            object target = label.FontFamily = (string)((IMarkupExtension)staticResourceExtension2).ProvideValue((IServiceProvider)xamlServiceProvider2);

            VisualDiagnostics.RegisterSourceInfo(target, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 23, 16);
            BindableProperty    fontSizeProperty     = Label.FontSizeProperty;
            FontSizeConverter   fontSizeConverter    = new FontSizeConverter();
            XamlServiceProvider xamlServiceProvider3 = new XamlServiceProvider();
            Type typeFromHandle6 = typeof(IProvideValueTarget);

            object[] array4 = new object[0 + 3];
            array4[0] = label;
            array4[1] = grid;
            array4[2] = tutorialPage;
            object service3;

            xamlServiceProvider3.Add(typeFromHandle6, service3 = new SimpleValueTargetProvider(array4, Label.FontSizeProperty, nameScope));
            xamlServiceProvider3.Add(typeof(IReferenceProvider), service3);
            Type typeFromHandle7 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver3 = new XmlNamespaceResolver();

            xmlNamespaceResolver3.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver3.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver3.Add("mvvm", "clr-namespace:AntilopeGP.Shared.MVVM");
            xmlNamespaceResolver3.Add("telerikPrimitives", "clr-namespace:Telerik.XamarinForms.Primitives;assembly=Telerik.XamarinForms.Primitives");
            xmlNamespaceResolver3.Add("telerikInput", "clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.XamarinForms.Input");
            xamlServiceProvider3.Add(typeFromHandle7, new XamlTypeResolver(xmlNamespaceResolver3, typeof(TutorialPage).GetTypeInfo().Assembly));
            xamlServiceProvider3.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(24, 16)));
            label.SetValue(fontSizeProperty, ((IExtendedTypeConverter)fontSizeConverter).ConvertFromInvariantString("Large", (IServiceProvider)xamlServiceProvider3));
            label.SetValue(Label.HorizontalTextAlignmentProperty, new TextAlignmentConverter().ConvertFromInvariantString("Center"));
            label.SetValue(Label.VerticalTextAlignmentProperty, new TextAlignmentConverter().ConvertFromInvariantString("Center"));
            grid.Children.Add(label);
            VisualDiagnostics.RegisterSourceInfo(label, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 21, 10);
            radSlideView.SetValue(Grid.RowProperty, 1);
            radSlideView.SetValue(View.MarginProperty, new Thickness(10.0, 0.0));
            radSlideView.SetValue(RadSlideView.HorizontalContentOptionsProperty, LayoutOptions.CenterAndExpand);
            radSlideView.SetValue(RadSlideView.VerticalContentOptionsProperty, LayoutOptions.StartAndExpand);
            staticResourceExtension3.Key = "DarkGrayColor";
            XamlServiceProvider xamlServiceProvider4 = new XamlServiceProvider();
            Type typeFromHandle8 = typeof(IProvideValueTarget);

            object[] array5 = new object[0 + 3];
            array5[0] = radSlideView;
            array5[1] = grid;
            array5[2] = tutorialPage;
            object service4;

            xamlServiceProvider4.Add(typeFromHandle8, service4 = new SimpleValueTargetProvider(array5, RadSlideView.IndicatorColorProperty, nameScope));
            xamlServiceProvider4.Add(typeof(IReferenceProvider), service4);
            Type typeFromHandle9 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver4 = new XmlNamespaceResolver();

            xmlNamespaceResolver4.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver4.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver4.Add("mvvm", "clr-namespace:AntilopeGP.Shared.MVVM");
            xmlNamespaceResolver4.Add("telerikPrimitives", "clr-namespace:Telerik.XamarinForms.Primitives;assembly=Telerik.XamarinForms.Primitives");
            xmlNamespaceResolver4.Add("telerikInput", "clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.XamarinForms.Input");
            xamlServiceProvider4.Add(typeFromHandle9, new XamlTypeResolver(xmlNamespaceResolver4, typeof(TutorialPage).GetTypeInfo().Assembly));
            xamlServiceProvider4.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(32, 41)));
            object obj2 = ((IMarkupExtension)staticResourceExtension3).ProvideValue((IServiceProvider)xamlServiceProvider4);

            radSlideView.IndicatorColor = (Color)obj2;
            VisualDiagnostics.RegisterSourceInfo(obj2, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 32, 41);
            staticResourceExtension4.Key = "TCLRed";
            XamlServiceProvider xamlServiceProvider5 = new XamlServiceProvider();
            Type typeFromHandle10 = typeof(IProvideValueTarget);

            object[] array6 = new object[0 + 3];
            array6[0] = radSlideView;
            array6[1] = grid;
            array6[2] = tutorialPage;
            object service5;

            xamlServiceProvider5.Add(typeFromHandle10, service5 = new SimpleValueTargetProvider(array6, RadSlideView.SelectedIndicatorColorProperty, nameScope));
            xamlServiceProvider5.Add(typeof(IReferenceProvider), service5);
            Type typeFromHandle11 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver5 = new XmlNamespaceResolver();

            xmlNamespaceResolver5.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver5.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver5.Add("mvvm", "clr-namespace:AntilopeGP.Shared.MVVM");
            xmlNamespaceResolver5.Add("telerikPrimitives", "clr-namespace:Telerik.XamarinForms.Primitives;assembly=Telerik.XamarinForms.Primitives");
            xmlNamespaceResolver5.Add("telerikInput", "clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.XamarinForms.Input");
            xamlServiceProvider5.Add(typeFromHandle11, new XamlTypeResolver(xmlNamespaceResolver5, typeof(TutorialPage).GetTypeInfo().Assembly));
            xamlServiceProvider5.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(33, 41)));
            object obj3 = ((IMarkupExtension)staticResourceExtension4).ProvideValue((IServiceProvider)xamlServiceProvider5);

            radSlideView.SelectedIndicatorColor = (Color)obj3;
            VisualDiagnostics.RegisterSourceInfo(obj3, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 33, 41);
            radSlideView.SetValue(RadSlideView.ItemsSourceProperty, array);
            VisualDiagnostics.RegisterSourceInfo(array, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 35, 18);
            grid.Children.Add(radSlideView);
            VisualDiagnostics.RegisterSourceInfo(radSlideView, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 27, 10);
            radButton.SetValue(Grid.RowProperty, 2);
            radButton.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
            radButton.SetValue(View.HorizontalOptionsProperty, LayoutOptions.Center);
            radButton.SetValue(VisualElement.HeightRequestProperty, 50.0);
            radButton.SetValue(Button.PaddingProperty, new Thickness(15.0, 0.0));
            radButton.SetValue(Button.BorderRadiusProperty, 25);
            radButton.SetValue(Button.TextProperty, "J'ai compris, fermer le tutoriel");
            staticResourceExtension5.Key = "MediumGrayColor";
            XamlServiceProvider xamlServiceProvider6 = new XamlServiceProvider();
            Type typeFromHandle12 = typeof(IProvideValueTarget);

            object[] array7 = new object[0 + 3];
            array7[0] = radButton;
            array7[1] = grid;
            array7[2] = tutorialPage;
            object service6;

            xamlServiceProvider6.Add(typeFromHandle12, service6 = new SimpleValueTargetProvider(array7, Button.TextColorProperty, nameScope));
            xamlServiceProvider6.Add(typeof(IReferenceProvider), service6);
            Type typeFromHandle13 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver6 = new XmlNamespaceResolver();

            xmlNamespaceResolver6.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver6.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver6.Add("mvvm", "clr-namespace:AntilopeGP.Shared.MVVM");
            xmlNamespaceResolver6.Add("telerikPrimitives", "clr-namespace:Telerik.XamarinForms.Primitives;assembly=Telerik.XamarinForms.Primitives");
            xmlNamespaceResolver6.Add("telerikInput", "clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.XamarinForms.Input");
            xamlServiceProvider6.Add(typeFromHandle13, new XamlTypeResolver(xmlNamespaceResolver6, typeof(TutorialPage).GetTypeInfo().Assembly));
            xamlServiceProvider6.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(70, 33)));
            object obj4 = ((IMarkupExtension)staticResourceExtension5).ProvideValue((IServiceProvider)xamlServiceProvider6);

            radButton.TextColor = (Color)obj4;
            VisualDiagnostics.RegisterSourceInfo(obj4, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 70, 33);
            staticResourceExtension6.Key = "TCLRegular";
            XamlServiceProvider xamlServiceProvider7 = new XamlServiceProvider();
            Type typeFromHandle14 = typeof(IProvideValueTarget);

            object[] array8 = new object[0 + 3];
            array8[0] = radButton;
            array8[1] = grid;
            array8[2] = tutorialPage;
            object service7;

            xamlServiceProvider7.Add(typeFromHandle14, service7 = new SimpleValueTargetProvider(array8, Button.FontFamilyProperty, nameScope));
            xamlServiceProvider7.Add(typeof(IReferenceProvider), service7);
            Type typeFromHandle15 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver7 = new XmlNamespaceResolver();

            xmlNamespaceResolver7.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver7.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver7.Add("mvvm", "clr-namespace:AntilopeGP.Shared.MVVM");
            xmlNamespaceResolver7.Add("telerikPrimitives", "clr-namespace:Telerik.XamarinForms.Primitives;assembly=Telerik.XamarinForms.Primitives");
            xmlNamespaceResolver7.Add("telerikInput", "clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.XamarinForms.Input");
            xamlServiceProvider7.Add(typeFromHandle15, new XamlTypeResolver(xmlNamespaceResolver7, typeof(TutorialPage).GetTypeInfo().Assembly));
            xamlServiceProvider7.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(71, 33)));
            object target2 = radButton.FontFamily = (string)((IMarkupExtension)staticResourceExtension6).ProvideValue((IServiceProvider)xamlServiceProvider7);

            VisualDiagnostics.RegisterSourceInfo(target2, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 71, 33);
            BindableProperty    fontSizeProperty2    = Button.FontSizeProperty;
            FontSizeConverter   fontSizeConverter2   = new FontSizeConverter();
            XamlServiceProvider xamlServiceProvider8 = new XamlServiceProvider();
            Type typeFromHandle16 = typeof(IProvideValueTarget);

            object[] array9 = new object[0 + 3];
            array9[0] = radButton;
            array9[1] = grid;
            array9[2] = tutorialPage;
            object service8;

            xamlServiceProvider8.Add(typeFromHandle16, service8 = new SimpleValueTargetProvider(array9, Button.FontSizeProperty, nameScope));
            xamlServiceProvider8.Add(typeof(IReferenceProvider), service8);
            Type typeFromHandle17 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver8 = new XmlNamespaceResolver();

            xmlNamespaceResolver8.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver8.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver8.Add("mvvm", "clr-namespace:AntilopeGP.Shared.MVVM");
            xmlNamespaceResolver8.Add("telerikPrimitives", "clr-namespace:Telerik.XamarinForms.Primitives;assembly=Telerik.XamarinForms.Primitives");
            xmlNamespaceResolver8.Add("telerikInput", "clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.XamarinForms.Input");
            xamlServiceProvider8.Add(typeFromHandle17, new XamlTypeResolver(xmlNamespaceResolver8, typeof(TutorialPage).GetTypeInfo().Assembly));
            xamlServiceProvider8.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(72, 33)));
            radButton.SetValue(fontSizeProperty2, ((IExtendedTypeConverter)fontSizeConverter2).ConvertFromInvariantString("Medium", (IServiceProvider)xamlServiceProvider8));
            staticResourceExtension7.Key = "LightGrayColor";
            XamlServiceProvider xamlServiceProvider9 = new XamlServiceProvider();
            Type typeFromHandle18 = typeof(IProvideValueTarget);

            object[] array10 = new object[0 + 3];
            array10[0] = radButton;
            array10[1] = grid;
            array10[2] = tutorialPage;
            object service9;

            xamlServiceProvider9.Add(typeFromHandle18, service9 = new SimpleValueTargetProvider(array10, VisualElement.BackgroundColorProperty, nameScope));
            xamlServiceProvider9.Add(typeof(IReferenceProvider), service9);
            Type typeFromHandle19 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver9 = new XmlNamespaceResolver();

            xmlNamespaceResolver9.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver9.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver9.Add("mvvm", "clr-namespace:AntilopeGP.Shared.MVVM");
            xmlNamespaceResolver9.Add("telerikPrimitives", "clr-namespace:Telerik.XamarinForms.Primitives;assembly=Telerik.XamarinForms.Primitives");
            xmlNamespaceResolver9.Add("telerikInput", "clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.XamarinForms.Input");
            xamlServiceProvider9.Add(typeFromHandle19, new XamlTypeResolver(xmlNamespaceResolver9, typeof(TutorialPage).GetTypeInfo().Assembly));
            xamlServiceProvider9.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(73, 33)));
            object obj5 = ((IMarkupExtension)staticResourceExtension7).ProvideValue((IServiceProvider)xamlServiceProvider9);

            radButton.BackgroundColor = (Color)obj5;
            VisualDiagnostics.RegisterSourceInfo(obj5, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 73, 33);
            referenceExtension.Name = "slideView";
            XamlServiceProvider xamlServiceProvider10 = new XamlServiceProvider();
            Type typeFromHandle20 = typeof(IProvideValueTarget);

            object[] array11 = new object[0 + 5];
            array11[0] = bindingExtension;
            array11[1] = dataTrigger;
            array11[2] = radButton;
            array11[3] = grid;
            array11[4] = tutorialPage;
            object service10;

            xamlServiceProvider10.Add(typeFromHandle20, service10 = new SimpleValueTargetProvider(array11, typeof(BindingExtension).GetRuntimeProperty("Source"), nameScope));
            xamlServiceProvider10.Add(typeof(IReferenceProvider), service10);
            Type typeFromHandle21 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver10 = new XmlNamespaceResolver();

            xmlNamespaceResolver10.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver10.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver10.Add("mvvm", "clr-namespace:AntilopeGP.Shared.MVVM");
            xmlNamespaceResolver10.Add("telerikPrimitives", "clr-namespace:Telerik.XamarinForms.Primitives;assembly=Telerik.XamarinForms.Primitives");
            xmlNamespaceResolver10.Add("telerikInput", "clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.XamarinForms.Input");
            xamlServiceProvider10.Add(typeFromHandle21, new XamlTypeResolver(xmlNamespaceResolver10, typeof(TutorialPage).GetTypeInfo().Assembly));
            xamlServiceProvider10.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(76, 30)));
            object target3 = bindingExtension.Source = ((IMarkupExtension)referenceExtension).ProvideValue((IServiceProvider)xamlServiceProvider10);

            VisualDiagnostics.RegisterSourceInfo(target3, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 76, 30);
            bindingExtension.Path = "SelectedIndex";
            BindingBase target4 = dataTrigger.Binding = ((IMarkupExtension <BindingBase>)bindingExtension).ProvideValue((IServiceProvider)null);

            VisualDiagnostics.RegisterSourceInfo(target4, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 76, 30);
            dataTrigger.Value      = "3";
            setter.Property        = Button.CommandProperty;
            bindingExtension2.Path = "AcceptTapCommand";
            BindingBase target5 = (BindingBase)(setter.Value = ((IMarkupExtension <BindingBase>)bindingExtension2).ProvideValue((IServiceProvider)null));

            VisualDiagnostics.RegisterSourceInfo(target5, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 79, 29);
            dataTrigger.Setters.Add(setter);
            VisualDiagnostics.RegisterSourceInfo(setter, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 78, 22);
            setter2.Property = Button.TextColorProperty;
            setter2.Value    = "White";
            setter2.Value    = Color.White;
            dataTrigger.Setters.Add(setter2);
            VisualDiagnostics.RegisterSourceInfo(setter2, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 80, 22);
            setter3.Property             = VisualElement.BackgroundColorProperty;
            staticResourceExtension8.Key = "TCLRed";
            XamlServiceProvider xamlServiceProvider11 = new XamlServiceProvider();
            Type typeFromHandle22 = typeof(IProvideValueTarget);

            object[] array12 = new object[0 + 5];
            array12[0] = setter3;
            array12[1] = dataTrigger;
            array12[2] = radButton;
            array12[3] = grid;
            array12[4] = tutorialPage;
            object service11;

            xamlServiceProvider11.Add(typeFromHandle22, service11 = new SimpleValueTargetProvider(array12, typeof(Setter).GetRuntimeProperty("Value"), nameScope));
            xamlServiceProvider11.Add(typeof(IReferenceProvider), service11);
            Type typeFromHandle23 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver11 = new XmlNamespaceResolver();

            xmlNamespaceResolver11.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver11.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver11.Add("mvvm", "clr-namespace:AntilopeGP.Shared.MVVM");
            xmlNamespaceResolver11.Add("telerikPrimitives", "clr-namespace:Telerik.XamarinForms.Primitives;assembly=Telerik.XamarinForms.Primitives");
            xmlNamespaceResolver11.Add("telerikInput", "clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.XamarinForms.Input");
            xamlServiceProvider11.Add(typeFromHandle23, new XamlTypeResolver(xmlNamespaceResolver11, typeof(TutorialPage).GetTypeInfo().Assembly));
            xamlServiceProvider11.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(83, 29)));
            object target6 = setter3.Value = ((IMarkupExtension)staticResourceExtension8).ProvideValue((IServiceProvider)xamlServiceProvider11);

            VisualDiagnostics.RegisterSourceInfo(target6, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 83, 29);
            dataTrigger.Setters.Add(setter3);
            VisualDiagnostics.RegisterSourceInfo(setter3, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 82, 22);
            ((ICollection <TriggerBase>)radButton.GetValue(VisualElement.TriggersProperty)).Add((TriggerBase)dataTrigger);
            VisualDiagnostics.RegisterSourceInfo(dataTrigger, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 75, 18);
            grid.Children.Add(radButton);
            VisualDiagnostics.RegisterSourceInfo(radButton, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 63, 10);
            tutorialPage.SetValue(ContentPage.ContentProperty, grid);
            VisualDiagnostics.RegisterSourceInfo(grid, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 15, 6);
            VisualDiagnostics.RegisterSourceInfo(tutorialPage, new Uri("Views\\TutorialPage.xaml", UriKind.RelativeOrAbsolute), 2, 2);
        }
コード例 #14
0
 public static void SetPixelHeight(RowDefinition rowDefinition, double value)
 {
     rowDefinition.SetValue(PixelHeightProperty, value);
 }
コード例 #15
0
ファイル: PhotoCell.cs プロジェクト: XiaoBaiXJ/RFID
        private void InitializeComponent()
        {
            if (ResourceLoader.ResourceProvider != null && ResourceLoader.ResourceProvider(typeof(PhotoCell).GetTypeInfo().Assembly.GetName(), "Layout/PhotoCell.xaml") != null)
            {
                this.__InitComponentRuntime();
                return;
            }
            if (XamlLoader.XamlFileProvider != null && XamlLoader.XamlFileProvider(base.GetType()) != null)
            {
                this.__InitComponentRuntime();
                return;
            }
            ColumnDefinition columnDefinition  = new ColumnDefinition();
            ColumnDefinition columnDefinition2 = new ColumnDefinition();
            RowDefinition    rowDefinition     = new RowDefinition();
            Label            label             = new Label();
            PhotoView        photoView         = new PhotoView();
            StackLayout      stackLayout       = new StackLayout();
            StackLayout      stackLayout2      = new StackLayout();
            ScrollView       scrollView        = new ScrollView();
            Grid             grid      = new Grid();
            NameScope        nameScope = new NameScope();

            NameScope.SetNameScope(this, nameScope);
            NameScope.SetNameScope(grid, nameScope);
            NameScope.SetNameScope(columnDefinition, nameScope);
            NameScope.SetNameScope(columnDefinition2, nameScope);
            NameScope.SetNameScope(rowDefinition, nameScope);
            NameScope.SetNameScope(label, nameScope);
            ((INameScope)nameScope).RegisterName("label", label);
            if (label.StyleId == null)
            {
                label.StyleId = "label";
            }
            NameScope.SetNameScope(scrollView, nameScope);
            NameScope.SetNameScope(stackLayout2, nameScope);
            NameScope.SetNameScope(photoView, nameScope);
            ((INameScope)nameScope).RegisterName("firstPhoto", photoView);
            if (photoView.StyleId == null)
            {
                photoView.StyleId = "firstPhoto";
            }
            NameScope.SetNameScope(stackLayout, nameScope);
            ((INameScope)nameScope).RegisterName("photoSL", stackLayout);
            if (stackLayout.StyleId == null)
            {
                stackLayout.StyleId = "photoSL";
            }
            this.label      = label;
            this.firstPhoto = photoView;
            this.photoSL    = stackLayout;
            grid.SetValue(VisualElement.BackgroundColorProperty, Color.White);
            grid.SetValue(Grid.RowSpacingProperty, 5.0);
            grid.SetValue(Layout.PaddingProperty, new Thickness(10.0, 5.0, 10.0, 5.0));
            columnDefinition.SetValue(ColumnDefinition.WidthProperty, new GridLengthTypeConverter().ConvertFromInvariantString("*"));
            grid.GetValue(Grid.ColumnDefinitionsProperty).Add(columnDefinition);
            columnDefinition2.SetValue(ColumnDefinition.WidthProperty, new GridLengthTypeConverter().ConvertFromInvariantString("3*"));
            grid.GetValue(Grid.ColumnDefinitionsProperty).Add(columnDefinition2);
            rowDefinition.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("Auto"));
            grid.GetValue(Grid.RowDefinitionsProperty).Add(rowDefinition);
            BindableObject         bindableObject        = label;
            BindableProperty       fontSizeProperty      = Label.FontSizeProperty;
            IExtendedTypeConverter extendedTypeConverter = new FontSizeConverter();
            string value = "Default";
            XamlServiceProvider xamlServiceProvider = new XamlServiceProvider();
            Type typeFromHandle = typeof(IProvideValueTarget);

            object[] array = new object[0 + 3];
            array[0] = label;
            array[1] = grid;
            array[2] = this;
            xamlServiceProvider.Add(typeFromHandle, new SimpleValueTargetProvider(array, Label.FontSizeProperty));
            xamlServiceProvider.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle2 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver = new XmlNamespaceResolver();

            xmlNamespaceResolver.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver.Add("svg", "clr-namespace:FFImageLoading.Svg.Forms;assembly=FFImageLoading.Svg.Forms");
            xamlServiceProvider.Add(typeFromHandle2, new XamlTypeResolver(xmlNamespaceResolver, typeof(PhotoCell).GetTypeInfo().Assembly));
            xamlServiceProvider.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(16, 20)));
            bindableObject.SetValue(fontSizeProperty, extendedTypeConverter.ConvertFromInvariantString(value, xamlServiceProvider));
            label.SetValue(Label.TextColorProperty, new Color(0.501960813999176, 0.501960813999176, 0.501960813999176, 1.0));
            label.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
            label.SetValue(View.HorizontalOptionsProperty, LayoutOptions.FillAndExpand);
            label.SetValue(Label.HorizontalTextAlignmentProperty, new TextAlignmentConverter().ConvertFromInvariantString("Start"));
            label.SetValue(Grid.ColumnProperty, 0);
            grid.Children.Add(label);
            scrollView.SetValue(Grid.ColumnProperty, 1);
            scrollView.SetValue(ScrollView.OrientationProperty, ScrollOrientation.Horizontal);
            scrollView.SetValue(View.HorizontalOptionsProperty, LayoutOptions.FillAndExpand);
            stackLayout2.SetValue(StackLayout.OrientationProperty, StackOrientation.Horizontal);
            photoView.Finished += this.Handle_Finished;
            photoView.Closed   += this.Handle_Closed;
            stackLayout2.Children.Add(photoView);
            stackLayout.SetValue(StackLayout.OrientationProperty, StackOrientation.Horizontal);
            stackLayout2.Children.Add(stackLayout);
            scrollView.Content = stackLayout2;
            grid.Children.Add(scrollView);
            this.View = grid;
        }
コード例 #16
0
 public static void SetMultiplier([NotNull] RowDefinition element, double value)
 {
     element.SetValue(AnimatedRow.MultiplierProperty, value);
 }
コード例 #17
0
 public static void SetHeight([NotNull] RowDefinition element, double value)
 {
     element.SetValue(AnimatedRow.HeightProperty, value);
 }
コード例 #18
0
        private async void DropItem(object sender, DragEventArgs e)
        {
            var    def = e.GetDeferral();
            string s   = await e.DataView.GetTextAsync();

            def.Complete();
            if (s.Equals(App.current.if_else) || s.Equals(App.current.@for))
            {
                RowDefinition defineRow = new RowDefinition();
                defineRow.SetValue(RowDefinition.HeightProperty, (new GridLength(1, GridUnitType.Star)));
                box.RowDefinitions.Add(defineRow);

                if (s.Equals(App.current.if_else))
                {
                    ifelse widget = new SpeakCode.ifelse();
                    widget.SetValue(Grid.RowProperty, box.Children.Count);
                    widget.SetValue(Grid.ColumnProperty, 0);

                    box.Children.Add(widget);
                }
                else if (s.Equals(App.current.@for))
                {
                    loop widget = new SpeakCode.loop();
                    widget.SetValue(Grid.RowProperty, box.Children.Count);
                    widget.SetValue(Grid.ColumnProperty, 0);

                    box.Children.Add(widget);
                }

                /*else if (s.Equals("function"))
                 * {
                 *  func widget = new SpeakCode.func();
                 *  widget.SetValue(Grid.RowProperty, box.Children.Count);
                 *  widget.SetValue(Grid.ColumnProperty, 0);
                 *
                 *  box.Children.Add(widget);
                 * }
                 * else if (s.Equals("return"))
                 * {
                 *  defineRow.SetValue(RowDefinition.HeightProperty, (new GridLength(1, GridUnitType.Auto)));
                 *
                 *  StackPanel st = new StackPanel();
                 *  st.Orientation = Orientation.Horizontal;
                 *  st.SetValue(Grid.RowProperty, box.Children.Count);
                 *  st.SetValue(Grid.ColumnProperty, 0);
                 *
                 *  TextBlock txt = new TextBlock();
                 *  txt.Text = "return";
                 *
                 *  st.Children.Add(txt);
                 *  st.Children.Add(new TextBox());
                 *
                 *  box.Children.Add(st);
                 * }*/

                this.AllowDrop = false;
            }
            else
            {
                RowDefinition defineRow = new RowDefinition();
                defineRow.SetValue(RowDefinition.HeightProperty, (new GridLength(1, GridUnitType.Auto)));
                box.RowDefinitions.Add(defineRow);

                if (s.Equals(App.current.print))
                {
                    StackPanel st = new StackPanel();
                    st.Orientation = Orientation.Horizontal;
                    st.SetValue(Grid.RowProperty, box.Children.Count);
                    st.SetValue(Grid.ColumnProperty, 0);

                    TextBlock txt = new TextBlock();
                    txt.Text = App.current.print;

                    st.Children.Add(txt);
                    st.Children.Add(new TextBox());

                    box.Children.Add(st);
                }
                else if (s.Equals(App.current.read))
                {
                    StackPanel st = new StackPanel();
                    st.Orientation = Orientation.Horizontal;
                    st.SetValue(Grid.RowProperty, box.Children.Count);
                    st.SetValue(Grid.ColumnProperty, 0);

                    TextBlock txt = new TextBlock();
                    txt.Text = App.current.read;

                    st.Children.Add(txt);
                    st.Children.Add(new TextBox());

                    box.Children.Add(st);
                }
                else if (s.Equals(App.current.@break))
                {
                    TextBlock txt = new TextBlock();
                    txt.Text = App.current.@break;
                    txt.SetValue(Grid.RowProperty, box.Children.Count);
                    txt.SetValue(Grid.ColumnProperty, 0);

                    box.Children.Add(txt);
                }
                else if (s.Equals(App.current.@continue))
                {
                    TextBlock txt = new TextBlock();
                    txt.Text = App.current.@continue;
                    txt.SetValue(Grid.RowProperty, box.Children.Count);
                    txt.SetValue(Grid.ColumnProperty, 0);

                    box.Children.Add(txt);
                }
                else if (s.Equals(App.current.@int))
                {
                    StackPanel st = new StackPanel();
                    st.Orientation = Orientation.Horizontal;
                    st.SetValue(Grid.RowProperty, box.Children.Count);
                    st.SetValue(Grid.ColumnProperty, 0);

                    TextBlock txt = new TextBlock();
                    txt.Text = App.current.@int;

                    st.Children.Add(txt);
                    st.Children.Add(new TextBox());

                    box.Children.Add(st);
                }
                else if (s.Equals(App.current.@string))
                {
                    StackPanel st = new StackPanel();
                    st.Orientation = Orientation.Horizontal;
                    st.SetValue(Grid.RowProperty, box.Children.Count);
                    st.SetValue(Grid.ColumnProperty, 0);

                    TextBlock txt = new TextBlock();
                    txt.Text = App.current.@string;

                    st.Children.Add(txt);
                    st.Children.Add(new TextBox());

                    box.Children.Add(st);
                }
                else if (s.Equals("equation"))
                {
                    StackPanel st = new StackPanel();
                    st.Orientation = Orientation.Horizontal;
                    st.SetValue(Grid.RowProperty, box.Children.Count);
                    st.SetValue(Grid.ColumnProperty, 0);

                    TextBlock txt = new TextBlock();
                    txt.Text = "equation";

                    st.Children.Add(txt);
                    st.Children.Add(new TextBox());

                    box.Children.Add(st);
                }
            }
        }
コード例 #19
0
ファイル: UploadPage.cs プロジェクト: XiaoBaiXJ/RFID
        private void InitializeComponent()
        {
            if (ResourceLoader.ResourceProvider != null && ResourceLoader.ResourceProvider(typeof(UploadPage).GetTypeInfo().Assembly.GetName(), "Views/UploadPage.xaml") != null)
            {
                this.__InitComponentRuntime();
                return;
            }
            if (XamlLoader.XamlFileProvider != null && XamlLoader.XamlFileProvider(base.GetType()) != null)
            {
                this.__InitComponentRuntime();
                return;
            }
            BindingExtension   bindingExtension    = new BindingExtension();
            RowDefinition      rowDefinition       = new RowDefinition();
            RowDefinition      rowDefinition2      = new RowDefinition();
            RowDefinition      rowDefinition3      = new RowDefinition();
            BindingExtension   bindingExtension2   = new BindingExtension();
            Label              label               = new Label();
            TranslateExtension translateExtension  = new TranslateExtension();
            BindingExtension   bindingExtension3   = new BindingExtension();
            TranslateExtension translateExtension2 = new TranslateExtension();
            NewEntryCell       newEntryCell        = new NewEntryCell();
            TranslateExtension translateExtension3 = new TranslateExtension();
            BindingExtension   bindingExtension4   = new BindingExtension();
            PhotoCell          photoCell           = new PhotoCell();
            TableSection       tableSection        = new TableSection();
            TableRoot          tableRoot           = new TableRoot();
            TableView          tableView           = new TableView();
            TranslateExtension translateExtension4 = new TranslateExtension();
            BindingExtension   bindingExtension5   = new BindingExtension();
            Button             button              = new Button();
            Grid       grid       = new Grid();
            ScrollView scrollView = new ScrollView();
            NameScope  nameScope  = new NameScope();

            NameScope.SetNameScope(this, nameScope);
            NameScope.SetNameScope(scrollView, nameScope);
            NameScope.SetNameScope(grid, nameScope);
            NameScope.SetNameScope(rowDefinition, nameScope);
            NameScope.SetNameScope(rowDefinition2, nameScope);
            NameScope.SetNameScope(rowDefinition3, nameScope);
            NameScope.SetNameScope(label, nameScope);
            NameScope.SetNameScope(tableView, nameScope);
            NameScope.SetNameScope(tableRoot, nameScope);
            NameScope.SetNameScope(tableSection, nameScope);
            NameScope.SetNameScope(newEntryCell, nameScope);
            NameScope.SetNameScope(photoCell, nameScope);
            ((INameScope)nameScope).RegisterName("photocell", photoCell);
            if (photoCell.StyleId == null)
            {
                photoCell.StyleId = "photocell";
            }
            NameScope.SetNameScope(button, nameScope);
            this.photocell = photoCell;
            this.SetValue(ViewModelLocator.AutowireViewModelProperty, new bool?(true));
            bindingExtension.Path = "Title";
            BindingBase binding = ((IMarkupExtension <BindingBase>)bindingExtension).ProvideValue(null);

            this.SetBinding(Page.TitleProperty, binding);
            grid.SetValue(Grid.RowSpacingProperty, 0.0);
            rowDefinition.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("Auto"));
            grid.GetValue(Grid.RowDefinitionsProperty).Add(rowDefinition);
            rowDefinition2.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("*"));
            grid.GetValue(Grid.RowDefinitionsProperty).Add(rowDefinition2);
            rowDefinition3.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("Auto"));
            grid.GetValue(Grid.RowDefinitionsProperty).Add(rowDefinition3);
            label.SetValue(View.MarginProperty, new Thickness(10.0));
            label.SetValue(Label.TextColorProperty, Color.Black);
            label.SetValue(Grid.RowProperty, 0);
            bindingExtension2.Path = "Detail";
            BindingBase binding2 = ((IMarkupExtension <BindingBase>)bindingExtension2).ProvideValue(null);

            label.SetBinding(Label.TextProperty, binding2);
            grid.Children.Add(label);
            tableView.Intent = TableIntent.Data;
            tableView.SetValue(Grid.RowProperty, 1);
            tableView.SetValue(TableView.HasUnevenRowsProperty, true);
            tableView.SetValue(VisualElement.BackgroundColorProperty, new Color(0.9843137264251709, 0.9843137264251709, 0.9843137264251709, 1.0));
            translateExtension.Text = "delivery";
            IMarkupExtension    markupExtension     = translateExtension;
            XamlServiceProvider xamlServiceProvider = new XamlServiceProvider();
            Type typeFromHandle = typeof(IProvideValueTarget);

            object[] array = new object[0 + 7];
            array[0] = newEntryCell;
            array[1] = tableSection;
            array[2] = tableRoot;
            array[3] = tableView;
            array[4] = grid;
            array[5] = scrollView;
            array[6] = this;
            xamlServiceProvider.Add(typeFromHandle, new SimpleValueTargetProvider(array, NewEntryCell.TitleProperty));
            xamlServiceProvider.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle2 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver = new XmlNamespaceResolver();

            xmlNamespaceResolver.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver.Add("prism", "clr-namespace:Prism.Mvvm;assembly=Prism.Forms");
            xmlNamespaceResolver.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver.Add("local", "clr-namespace:RFID");
            xamlServiceProvider.Add(typeFromHandle2, new XamlTypeResolver(xmlNamespaceResolver, typeof(UploadPage).GetTypeInfo().Assembly));
            xamlServiceProvider.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(25, 50)));
            object title = markupExtension.ProvideValue(xamlServiceProvider);

            newEntryCell.Title     = title;
            bindingExtension3.Path = "Delivery";
            BindingBase binding3 = ((IMarkupExtension <BindingBase>)bindingExtension3).ProvideValue(null);

            newEntryCell.SetBinding(NewEntryCell.TextProperty, binding3);
            translateExtension2.Text = "please";
            IMarkupExtension    markupExtension2     = translateExtension2;
            XamlServiceProvider xamlServiceProvider2 = new XamlServiceProvider();
            Type typeFromHandle3 = typeof(IProvideValueTarget);

            object[] array2 = new object[0 + 7];
            array2[0] = newEntryCell;
            array2[1] = tableSection;
            array2[2] = tableRoot;
            array2[3] = tableView;
            array2[4] = grid;
            array2[5] = scrollView;
            array2[6] = this;
            xamlServiceProvider2.Add(typeFromHandle3, new SimpleValueTargetProvider(array2, NewEntryCell.HintProperty));
            xamlServiceProvider2.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle4 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver2 = new XmlNamespaceResolver();

            xmlNamespaceResolver2.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver2.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver2.Add("prism", "clr-namespace:Prism.Mvvm;assembly=Prism.Forms");
            xmlNamespaceResolver2.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver2.Add("local", "clr-namespace:RFID");
            xamlServiceProvider2.Add(typeFromHandle4, new XamlTypeResolver(xmlNamespaceResolver2, typeof(UploadPage).GetTypeInfo().Assembly));
            xamlServiceProvider2.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(25, 111)));
            object hint = markupExtension2.ProvideValue(xamlServiceProvider2);

            newEntryCell.Hint = hint;
            tableSection.Add(newEntryCell);
            translateExtension3.Text = "deliveryphoto";
            IMarkupExtension    markupExtension3     = translateExtension3;
            XamlServiceProvider xamlServiceProvider3 = new XamlServiceProvider();
            Type typeFromHandle5 = typeof(IProvideValueTarget);

            object[] array3 = new object[0 + 7];
            array3[0] = photoCell;
            array3[1] = tableSection;
            array3[2] = tableRoot;
            array3[3] = tableView;
            array3[4] = grid;
            array3[5] = scrollView;
            array3[6] = this;
            xamlServiceProvider3.Add(typeFromHandle5, new SimpleValueTargetProvider(array3, PhotoCell.TitleProperty));
            xamlServiceProvider3.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle6 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver3 = new XmlNamespaceResolver();

            xmlNamespaceResolver3.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver3.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver3.Add("prism", "clr-namespace:Prism.Mvvm;assembly=Prism.Forms");
            xmlNamespaceResolver3.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver3.Add("local", "clr-namespace:RFID");
            xamlServiceProvider3.Add(typeFromHandle6, new XamlTypeResolver(xmlNamespaceResolver3, typeof(UploadPage).GetTypeInfo().Assembly));
            xamlServiceProvider3.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(26, 66)));
            object title2 = markupExtension3.ProvideValue(xamlServiceProvider3);

            photoCell.Title        = title2;
            bindingExtension4.Path = "ImageFiles";
            BindingBase binding4 = ((IMarkupExtension <BindingBase>)bindingExtension4).ProvideValue(null);

            photoCell.SetBinding(PhotoCell.FilesProperty, binding4);
            photoCell.SetValue(PhotoCell.CanTakeMoreProperty, false);
            tableSection.Add(photoCell);
            tableRoot.Add(tableSection);
            tableView.Root = tableRoot;
            grid.Children.Add(tableView);
            button.SetValue(View.MarginProperty, new Thickness(20.0));
            translateExtension4.Text = "submit";
            IMarkupExtension    markupExtension4     = translateExtension4;
            XamlServiceProvider xamlServiceProvider4 = new XamlServiceProvider();
            Type typeFromHandle7 = typeof(IProvideValueTarget);

            object[] array4 = new object[0 + 4];
            array4[0] = button;
            array4[1] = grid;
            array4[2] = scrollView;
            array4[3] = this;
            xamlServiceProvider4.Add(typeFromHandle7, new SimpleValueTargetProvider(array4, Button.TextProperty));
            xamlServiceProvider4.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle8 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver4 = new XmlNamespaceResolver();

            xmlNamespaceResolver4.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver4.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver4.Add("prism", "clr-namespace:Prism.Mvvm;assembly=Prism.Forms");
            xmlNamespaceResolver4.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver4.Add("local", "clr-namespace:RFID");
            xamlServiceProvider4.Add(typeFromHandle8, new XamlTypeResolver(xmlNamespaceResolver4, typeof(UploadPage).GetTypeInfo().Assembly));
            xamlServiceProvider4.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(30, 37)));
            object text = markupExtension4.ProvideValue(xamlServiceProvider4);

            button.Text            = text;
            bindingExtension5.Path = "CommitCommand";
            BindingBase binding5 = ((IMarkupExtension <BindingBase>)bindingExtension5).ProvideValue(null);

            button.SetBinding(Button.CommandProperty, binding5);
            button.SetValue(Button.TextColorProperty, Color.White);
            button.SetValue(VisualElement.BackgroundColorProperty, new Color(0.050980392843484879, 0.27843138575553894, 0.63137257099151611, 1.0));
            button.SetValue(Grid.RowProperty, 2);
            button.SetValue(Button.BorderRadiusProperty, 10);
            button.SetValue(Button.BorderColorProperty, new Color(0.050980392843484879, 0.27843138575553894, 0.63137257099151611, 1.0));
            button.SetValue(Button.BorderWidthProperty, 1.0);
            grid.Children.Add(button);
            scrollView.Content = grid;
            this.SetValue(ContentPage.ContentProperty, scrollView);
        }
コード例 #20
0
        private void InitializeComponent()
        {
            if (ResourceLoader.ResourceProvider != null && ResourceLoader.ResourceProvider(typeof(FuncView).GetTypeInfo().Assembly.GetName(), "Layout/FuncView.xaml") != null)
            {
                this.__InitComponentRuntime();
                return;
            }
            if (XamlLoader.XamlFileProvider != null && XamlLoader.XamlFileProvider(base.GetType()) != null)
            {
                this.__InitComponentRuntime();
                return;
            }
            RowDefinition        rowDefinition        = new RowDefinition();
            RowDefinition        rowDefinition2       = new RowDefinition();
            TapGestureRecognizer tapGestureRecognizer = new TapGestureRecognizer();
            SvgCachedImage       svgCachedImage       = new SvgCachedImage();
            Label     label     = new Label();
            Grid      grid      = new Grid();
            Frame     frame     = new Frame();
            NameScope nameScope = new NameScope();

            NameScope.SetNameScope(this, nameScope);
            NameScope.SetNameScope(frame, nameScope);
            NameScope.SetNameScope(grid, nameScope);
            NameScope.SetNameScope(rowDefinition, nameScope);
            NameScope.SetNameScope(rowDefinition2, nameScope);
            NameScope.SetNameScope(tapGestureRecognizer, nameScope);
            NameScope.SetNameScope(svgCachedImage, nameScope);
            ((INameScope)nameScope).RegisterName("image", svgCachedImage);
            if (svgCachedImage.StyleId == null)
            {
                svgCachedImage.StyleId = "image";
            }
            NameScope.SetNameScope(label, nameScope);
            ((INameScope)nameScope).RegisterName("label", label);
            if (label.StyleId == null)
            {
                label.StyleId = "label";
            }
            this.image = svgCachedImage;
            this.label = label;
            frame.SetValue(Frame.HasShadowProperty, false);
            frame.SetValue(Frame.CornerRadiusProperty, 5f);
            frame.SetValue(Xamarin.Forms.Layout.PaddingProperty, new Thickness(0.0));
            grid.SetValue(Grid.RowSpacingProperty, 3.0);
            rowDefinition.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("3*"));
            grid.GetValue(Grid.RowDefinitionsProperty).Add(rowDefinition);
            rowDefinition2.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("2*"));
            grid.GetValue(Grid.RowDefinitionsProperty).Add(rowDefinition2);
            tapGestureRecognizer.Tapped += this.Handle_Tapped;
            grid.GestureRecognizers.Add(tapGestureRecognizer);
            svgCachedImage.SetValue(CachedImage.AspectProperty, Aspect.AspectFit);
            svgCachedImage.SetValue(View.HorizontalOptionsProperty, LayoutOptions.Center);
            svgCachedImage.SetValue(View.VerticalOptionsProperty, LayoutOptions.End);
            svgCachedImage.SetValue(VisualElement.WidthRequestProperty, 50.0);
            svgCachedImage.SetValue(VisualElement.HeightRequestProperty, 50.0);
            svgCachedImage.SetValue(Grid.RowProperty, 0);
            grid.Children.Add(svgCachedImage);
            label.SetValue(Label.TextColorProperty, Color.Black);
            BindableObject         bindableObject        = label;
            BindableProperty       fontSizeProperty      = Label.FontSizeProperty;
            IExtendedTypeConverter extendedTypeConverter = new FontSizeConverter();
            string value = "Medium";
            XamlServiceProvider xamlServiceProvider = new XamlServiceProvider();
            Type typeFromHandle = typeof(IProvideValueTarget);

            object[] array = new object[0 + 4];
            array[0] = label;
            array[1] = grid;
            array[2] = frame;
            array[3] = this;
            xamlServiceProvider.Add(typeFromHandle, new SimpleValueTargetProvider(array, Label.FontSizeProperty));
            xamlServiceProvider.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle2 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver = new XmlNamespaceResolver();

            xmlNamespaceResolver.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver.Add("svg", "clr-namespace:FFImageLoading.Svg.Forms;assembly=FFImageLoading.Svg.Forms");
            xamlServiceProvider.Add(typeFromHandle2, new XamlTypeResolver(xmlNamespaceResolver, typeof(FuncView).GetTypeInfo().Assembly));
            xamlServiceProvider.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(15, 53)));
            bindableObject.SetValue(fontSizeProperty, extendedTypeConverter.ConvertFromInvariantString(value, xamlServiceProvider));
            label.SetValue(Label.VerticalTextAlignmentProperty, new TextAlignmentConverter().ConvertFromInvariantString("Center"));
            label.SetValue(View.HorizontalOptionsProperty, LayoutOptions.Center);
            label.SetValue(View.VerticalOptionsProperty, LayoutOptions.Start);
            label.SetValue(Grid.RowProperty, 1);
            grid.Children.Add(label);
            frame.SetValue(ContentView.ContentProperty, grid);
            this.SetValue(ContentView.ContentProperty, frame);
        }
コード例 #21
0
ファイル: CarPage.cs プロジェクト: XiaoBaiXJ/RFID
        private void InitializeComponent()
        {
            if (ResourceLoader.ResourceProvider != null && ResourceLoader.ResourceProvider(typeof(CarPage).GetTypeInfo().Assembly.GetName(), "Views/CarPage.xaml") != null)
            {
                this.__InitComponentRuntime();
                return;
            }
            if (XamlLoader.XamlFileProvider != null && XamlLoader.XamlFileProvider(base.GetType()) != null)
            {
                this.__InitComponentRuntime();
                return;
            }
            BindingExtension       bindingExtension       = new BindingExtension();
            RowDefinition          rowDefinition          = new RowDefinition();
            RowDefinition          rowDefinition2         = new RowDefinition();
            ColumnDefinition       columnDefinition       = new ColumnDefinition();
            ColumnDefinition       columnDefinition2      = new ColumnDefinition();
            BindingExtension       bindingExtension2      = new BindingExtension();
            TranslateExtension     translateExtension     = new TranslateExtension();
            BindingExtension       bindingExtension3      = new BindingExtension();
            BindingExtension       bindingExtension4      = new BindingExtension();
            EventToCommandBehavior eventToCommandBehavior = new EventToCommandBehavior();
            SearchBar            searchBar            = new SearchBar();
            BindingExtension     bindingExtension5    = new BindingExtension();
            BindingExtension     bindingExtension6    = new BindingExtension();
            TapGestureRecognizer tapGestureRecognizer = new TapGestureRecognizer();
            SvgCachedImage       svgCachedImage       = new SvgCachedImage();
            Grid                   grid = new Grid();
            BindingExtension       bindingExtension7       = new BindingExtension();
            BindingExtension       bindingExtension8       = new BindingExtension();
            EventToCommandBehavior eventToCommandBehavior2 = new EventToCommandBehavior();
            DataTemplate           dataTemplate            = new DataTemplate();
            ListView               listView           = new ListView();
            Grid                   grid2              = new Grid();
            BindingExtension       bindingExtension9  = new BindingExtension();
            BindingExtension       bindingExtension10 = new BindingExtension();
            ActivityIndicator      activityIndicator  = new ActivityIndicator();
            Grid                   grid3              = new Grid();
            NameScope              nameScope          = new NameScope();

            NameScope.SetNameScope(this, nameScope);
            NameScope.SetNameScope(grid3, nameScope);
            NameScope.SetNameScope(grid2, nameScope);
            NameScope.SetNameScope(rowDefinition, nameScope);
            NameScope.SetNameScope(rowDefinition2, nameScope);
            NameScope.SetNameScope(grid, nameScope);
            NameScope.SetNameScope(columnDefinition, nameScope);
            NameScope.SetNameScope(columnDefinition2, nameScope);
            NameScope.SetNameScope(searchBar, nameScope);
            NameScope.SetNameScope(eventToCommandBehavior, nameScope);
            NameScope.SetNameScope(svgCachedImage, nameScope);
            NameScope.SetNameScope(tapGestureRecognizer, nameScope);
            NameScope.SetNameScope(listView, nameScope);
            ((INameScope)nameScope).RegisterName("listview", listView);
            if (listView.StyleId == null)
            {
                listView.StyleId = "listview";
            }
            NameScope.SetNameScope(eventToCommandBehavior2, nameScope);
            NameScope.SetNameScope(activityIndicator, nameScope);
            this.listview = listView;
            this.SetValue(ViewModelLocator.AutowireViewModelProperty, new bool?(true));
            bindingExtension.Path = "Title";
            BindingBase binding = ((IMarkupExtension <BindingBase>)bindingExtension).ProvideValue(null);

            this.SetBinding(Page.TitleProperty, binding);
            rowDefinition.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("Auto"));
            grid2.GetValue(Grid.RowDefinitionsProperty).Add(rowDefinition);
            rowDefinition2.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("*"));
            grid2.GetValue(Grid.RowDefinitionsProperty).Add(rowDefinition2);
            grid.SetValue(Grid.RowProperty, 0);
            grid.SetValue(VisualElement.BackgroundColorProperty, Color.White);
            grid.SetValue(Xamarin.Forms.Layout.PaddingProperty, new Thickness(10.0));
            grid.SetValue(Grid.ColumnSpacingProperty, 10.0);
            columnDefinition.SetValue(ColumnDefinition.WidthProperty, new GridLengthTypeConverter().ConvertFromInvariantString("*"));
            grid.GetValue(Grid.ColumnDefinitionsProperty).Add(columnDefinition);
            columnDefinition2.SetValue(ColumnDefinition.WidthProperty, new GridLengthTypeConverter().ConvertFromInvariantString("24"));
            grid.GetValue(Grid.ColumnDefinitionsProperty).Add(columnDefinition2);
            searchBar.SetValue(Grid.ColumnProperty, 0);
            bindingExtension2.Path = "CarNo";
            BindingBase binding2 = ((IMarkupExtension <BindingBase>)bindingExtension2).ProvideValue(null);

            searchBar.SetBinding(SearchBar.TextProperty, binding2);
            translateExtension.Text = "search";
            IMarkupExtension    markupExtension     = translateExtension;
            XamlServiceProvider xamlServiceProvider = new XamlServiceProvider();
            Type typeFromHandle = typeof(IProvideValueTarget);

            object[] array = new object[0 + 5];
            array[0] = searchBar;
            array[1] = grid;
            array[2] = grid2;
            array[3] = grid3;
            array[4] = this;
            xamlServiceProvider.Add(typeFromHandle, new SimpleValueTargetProvider(array, SearchBar.PlaceholderProperty));
            xamlServiceProvider.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle2 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver = new XmlNamespaceResolver();

            xmlNamespaceResolver.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver.Add("prism", "clr-namespace:Prism.Mvvm;assembly=Prism.Forms");
            xmlNamespaceResolver.Add("local", "clr-namespace:RFID");
            xmlNamespaceResolver.Add("b", "clr-namespace:Prism.Behaviors;assembly=Prism.Forms");
            xmlNamespaceResolver.Add("svg", "clr-namespace:FFImageLoading.Svg.Forms;assembly=FFImageLoading.Svg.Forms");
            xamlServiceProvider.Add(typeFromHandle2, new XamlTypeResolver(xmlNamespaceResolver, typeof(CarPage).GetTypeInfo().Assembly));
            xamlServiceProvider.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(22, 60)));
            object placeholder = markupExtension.ProvideValue(xamlServiceProvider);

            searchBar.Placeholder = placeholder;
            searchBar.SetValue(SearchBar.TextColorProperty, new Color(0.501960813999176, 0.501960813999176, 0.501960813999176, 1.0));
            bindingExtension3.Path = "SearchCommand";
            BindingBase binding3 = ((IMarkupExtension <BindingBase>)bindingExtension3).ProvideValue(null);

            searchBar.SetBinding(SearchBar.SearchCommandProperty, binding3);
            searchBar.SetValue(VisualElement.BackgroundColorProperty, new Color(0.93725490570068359, 0.93725490570068359, 0.93725490570068359, 1.0));
            eventToCommandBehavior.SetValue(EventToCommandBehavior.EventNameProperty, "TextChanged");
            bindingExtension4.Path = "SearchCommand";
            BindingBase binding4 = ((IMarkupExtension <BindingBase>)bindingExtension4).ProvideValue(null);

            eventToCommandBehavior.SetBinding(EventToCommandBehavior.CommandProperty, binding4);
            ((ICollection <Behavior>)searchBar.GetValue(VisualElement.BehaviorsProperty)).Add(eventToCommandBehavior);
            grid.Children.Add(searchBar);
            svgCachedImage.SetValue(Grid.ColumnProperty, 1);
            svgCachedImage.SetValue(VisualElement.WidthRequestProperty, 24.0);
            bindingExtension5.Path = "IsException";
            BindingBase binding5 = ((IMarkupExtension <BindingBase>)bindingExtension5).ProvideValue(null);

            svgCachedImage.SetBinding(VisualElement.IsVisibleProperty, binding5);
            svgCachedImage.SetValue(VisualElement.HeightRequestProperty, 24.0);
            svgCachedImage.SetValue(CachedImage.SourceProperty, new FFImageLoading.Forms.ImageSourceConverter().ConvertFromInvariantString("plus.svg"));
            bindingExtension6.Path = "AddCommand";
            BindingBase binding6 = ((IMarkupExtension <BindingBase>)bindingExtension6).ProvideValue(null);

            tapGestureRecognizer.SetBinding(TapGestureRecognizer.CommandProperty, binding6);
            svgCachedImage.GestureRecognizers.Add(tapGestureRecognizer);
            grid.Children.Add(svgCachedImage);
            grid2.Children.Add(grid);
            listView.SetValue(Grid.RowProperty, 1);
            listView.SetValue(VisualElement.BackgroundColorProperty, new Color(0.98039215803146362, 0.98039215803146362, 0.98039215803146362, 1.0));
            bindingExtension7.Path = "CarSource";
            BindingBase binding7 = ((IMarkupExtension <BindingBase>)bindingExtension7).ProvideValue(null);

            listView.SetBinding(ItemsView <Cell> .ItemsSourceProperty, binding7);
            listView.ItemSelected += this.Handle_ItemSelected;
            eventToCommandBehavior2.SetValue(EventToCommandBehavior.EventNameProperty, "ItemTapped");
            bindingExtension8.Path = "SelectCommand";
            BindingBase binding8 = ((IMarkupExtension <BindingBase>)bindingExtension8).ProvideValue(null);

            eventToCommandBehavior2.SetBinding(EventToCommandBehavior.CommandProperty, binding8);
            eventToCommandBehavior2.SetValue(EventToCommandBehavior.EventArgsParameterPathProperty, "Item");
            ((ICollection <Behavior>)listView.GetValue(VisualElement.BehaviorsProperty)).Add(eventToCommandBehavior2);
            IDataTemplate dataTemplate2 = dataTemplate;

            CarPage.< InitializeComponent > _anonXamlCDataTemplate_4 <InitializeComponent> _anonXamlCDataTemplate_ = new CarPage.< InitializeComponent > _anonXamlCDataTemplate_4();
            object[]  array2 = new object[0 + 5];
            array2[0] = dataTemplate;
            array2[1] = listView;
            array2[2] = grid2;
            array2[3] = grid3;
            array2[4] = this;
コード例 #22
0
ファイル: NewImageCell.cs プロジェクト: XiaoBaiXJ/RFID
        private void InitializeComponent()
        {
            if (ResourceLoader.ResourceProvider != null && ResourceLoader.ResourceProvider(typeof(NewImageCell).GetTypeInfo().Assembly.GetName(), "Layout/NewImageCell.xaml") != null)
            {
                this.__InitComponentRuntime();
                return;
            }
            if (XamlLoader.XamlFileProvider != null && XamlLoader.XamlFileProvider(base.GetType()) != null)
            {
                this.__InitComponentRuntime();
                return;
            }
            ColumnDefinition     columnDefinition     = new ColumnDefinition();
            ColumnDefinition     columnDefinition2    = new ColumnDefinition();
            RowDefinition        rowDefinition        = new RowDefinition();
            Label                label                = new Label();
            TapGestureRecognizer tapGestureRecognizer = new TapGestureRecognizer();
            Image                image                = new Image();
            Grid      grid      = new Grid();
            Grid      grid2     = new Grid();
            NameScope nameScope = new NameScope();

            NameScope.SetNameScope(this, nameScope);
            NameScope.SetNameScope(grid2, nameScope);
            NameScope.SetNameScope(columnDefinition, nameScope);
            NameScope.SetNameScope(columnDefinition2, nameScope);
            NameScope.SetNameScope(rowDefinition, nameScope);
            NameScope.SetNameScope(label, nameScope);
            ((INameScope)nameScope).RegisterName("label", label);
            if (label.StyleId == null)
            {
                label.StyleId = "label";
            }
            NameScope.SetNameScope(grid, nameScope);
            NameScope.SetNameScope(image, nameScope);
            ((INameScope)nameScope).RegisterName("image", image);
            if (image.StyleId == null)
            {
                image.StyleId = "image";
            }
            NameScope.SetNameScope(tapGestureRecognizer, nameScope);
            this.label = label;
            this.image = image;
            grid2.SetValue(VisualElement.BackgroundColorProperty, Color.White);
            grid2.SetValue(Grid.RowSpacingProperty, 5.0);
            grid2.SetValue(Layout.PaddingProperty, new Thickness(10.0, 5.0, 10.0, 5.0));
            columnDefinition.SetValue(ColumnDefinition.WidthProperty, new GridLengthTypeConverter().ConvertFromInvariantString("*"));
            grid2.GetValue(Grid.ColumnDefinitionsProperty).Add(columnDefinition);
            columnDefinition2.SetValue(ColumnDefinition.WidthProperty, new GridLengthTypeConverter().ConvertFromInvariantString("3*"));
            grid2.GetValue(Grid.ColumnDefinitionsProperty).Add(columnDefinition2);
            rowDefinition.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("90"));
            grid2.GetValue(Grid.RowDefinitionsProperty).Add(rowDefinition);
            BindableObject         bindableObject        = label;
            BindableProperty       fontSizeProperty      = Label.FontSizeProperty;
            IExtendedTypeConverter extendedTypeConverter = new FontSizeConverter();
            string value = "Default";
            XamlServiceProvider xamlServiceProvider = new XamlServiceProvider();
            Type typeFromHandle = typeof(IProvideValueTarget);

            object[] array = new object[0 + 3];
            array[0] = label;
            array[1] = grid2;
            array[2] = this;
            xamlServiceProvider.Add(typeFromHandle, new SimpleValueTargetProvider(array, Label.FontSizeProperty));
            xamlServiceProvider.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle2 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver = new XmlNamespaceResolver();

            xmlNamespaceResolver.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver.Add("image", "clr-namespace:FFImageLoading.Forms;assembly=FFImageLoading.Forms");
            xamlServiceProvider.Add(typeFromHandle2, new XamlTypeResolver(xmlNamespaceResolver, typeof(NewImageCell).GetTypeInfo().Assembly));
            xamlServiceProvider.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(15, 20)));
            bindableObject.SetValue(fontSizeProperty, extendedTypeConverter.ConvertFromInvariantString(value, xamlServiceProvider));
            label.SetValue(Label.TextColorProperty, new Color(0.501960813999176, 0.501960813999176, 0.501960813999176, 1.0));
            label.SetValue(View.VerticalOptionsProperty, LayoutOptions.Start);
            label.SetValue(View.HorizontalOptionsProperty, LayoutOptions.FillAndExpand);
            label.SetValue(Label.HorizontalTextAlignmentProperty, new TextAlignmentConverter().ConvertFromInvariantString("Start"));
            label.SetValue(Grid.ColumnProperty, 0);
            grid2.Children.Add(label);
            grid.SetValue(Grid.ColumnProperty, 1);
            image.SetValue(View.HorizontalOptionsProperty, LayoutOptions.Start);
            image.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
            image.SetValue(VisualElement.HeightRequestProperty, 90.0);
            image.SetValue(VisualElement.WidthRequestProperty, 90.0);
            image.SetValue(Image.AspectProperty, Aspect.AspectFill);
            tapGestureRecognizer.Tapped += new EventHandler(this.TapGestureRecognizer_Tapped);
            image.GestureRecognizers.Add(tapGestureRecognizer);
            grid.Children.Add(image);
            grid2.Children.Add(grid);
            this.View = grid2;
        }
コード例 #23
0
        public static List <Border> SplitScreen(Point pStartRowColumn, Point pOverRowColumn, Grid gAllSlideBox, ResourceDictionary rdDirectory)
        {
            List <Border> list = new List <Border>();

            pStartRowColumn.X *= 2.0;
            pStartRowColumn.Y *= 2.0;
            pOverRowColumn.X  *= 2.0;
            pOverRowColumn.Y  *= 2.0;
            int num;
            int num2;

            if (pStartRowColumn.X < pOverRowColumn.X)
            {
                num  = (int)pStartRowColumn.X;
                num2 = (int)pOverRowColumn.X;
            }
            else
            {
                num  = (int)pOverRowColumn.X;
                num2 = (int)pStartRowColumn.X;
            }
            int num3;
            int num4;

            if (pStartRowColumn.Y < (double)(int)pOverRowColumn.Y)
            {
                num3 = (int)pStartRowColumn.Y;
                num4 = (int)pOverRowColumn.Y;
            }
            else
            {
                num3 = (int)pOverRowColumn.Y;
                num4 = (int)pStartRowColumn.Y;
            }
            Dictionary <Point, Border> dictionary = new Dictionary <Point, Border>();

            foreach (FrameworkElement child in gAllSlideBox.Children)
            {
                if (child is Border)
                {
                    int row    = Grid.GetRow(child);
                    int column = Grid.GetColumn(child);
                    if (num <= row && row <= num2 && num3 <= column && column <= num4)
                    {
                        dictionary.Add(new Point(row - num, column - num3), (Border)child);
                    }
                }
            }
            ClearSplitScreen(gAllSlideBox);
            int num5 = Math.Abs((int)(pStartRowColumn.X - pOverRowColumn.X));
            int num6 = Math.Abs((int)(pStartRowColumn.Y - pOverRowColumn.Y));

            for (int i = 0; i <= num5; i++)
            {
                RowDefinition rowDefinition = new RowDefinition();
                gAllSlideBox.RowDefinitions.Add(rowDefinition);
                if (i % 2 == 1)
                {
                    GridSplitter gridSplitter = new GridSplitter();
                    gridSplitter.SetValue(FrameworkElement.StyleProperty, rdDirectory["HorGridSplitter"]);
                    Grid.SetRow(gridSplitter, i);
                    Grid.SetColumnSpan(gridSplitter, num6 + 1);
                    gAllSlideBox.Children.Add(gridSplitter);
                    rowDefinition.SetValue(FrameworkElement.StyleProperty, rdDirectory["SplitterRow"]);
                }
                else
                {
                    rowDefinition.SetValue(FrameworkElement.StyleProperty, rdDirectory["SlideRow"]);
                }
            }
            for (int j = 0; j <= num6; j++)
            {
                ColumnDefinition columnDefinition = new ColumnDefinition();
                gAllSlideBox.ColumnDefinitions.Add(columnDefinition);
                if (j % 2 == 1)
                {
                    GridSplitter gridSplitter2 = new GridSplitter();
                    gridSplitter2.SetValue(FrameworkElement.StyleProperty, rdDirectory["VerGridSplitter"]);
                    Grid.SetColumn(gridSplitter2, j);
                    Grid.SetRowSpan(gridSplitter2, num5 + 1);
                    gAllSlideBox.Children.Add(gridSplitter2);
                    columnDefinition.SetValue(FrameworkElement.StyleProperty, rdDirectory["SplitterColumn"]);
                }
                else
                {
                    columnDefinition.SetValue(FrameworkElement.StyleProperty, rdDirectory["SlideColumn"]);
                }
            }
            for (int k = 0; k <= num5; k++)
            {
                if (k % 2 == 1)
                {
                    continue;
                }
                for (int l = 0; l <= num6; l++)
                {
                    if (l % 2 == 1)
                    {
                        continue;
                    }
                    Point  key = new Point(k, l);
                    Border border;
                    if (dictionary.ContainsKey(key))
                    {
                        border = dictionary[key];
                        if (num5 == 0 && num6 == 0)
                        {
                            RemoveActiveStyle(border.Child as Grid);
                        }
                    }
                    else
                    {
                        border = CreateSlideBox(rdDirectory);
                        list.Add(border);
                    }
                    Grid.SetRow(border, k);
                    Grid.SetColumn(border, l);
                    gAllSlideBox.Children.Add(border);
                }
            }
            dictionary.Clear();
            return(list);
        }
コード例 #24
0
        private void InitializeComponent()
        {
            if (ResourceLoader.ResourceProvider != null && ResourceLoader.ResourceProvider(typeof(NewEntryCell).GetTypeInfo().Assembly.GetName(), "Layout/NewEntryCell.xaml") != null)
            {
                this.__InitComponentRuntime();
                return;
            }
            if (XamlLoader.XamlFileProvider != null && XamlLoader.XamlFileProvider(base.GetType()) != null)
            {
                this.__InitComponentRuntime();
                return;
            }
            ColumnDefinition columnDefinition  = new ColumnDefinition();
            ColumnDefinition columnDefinition2 = new ColumnDefinition();
            RowDefinition    rowDefinition     = new RowDefinition();
            Label            label             = new Label();
            NoBorderEntry    noBorderEntry     = new NoBorderEntry();
            Grid             grid      = new Grid();
            NameScope        nameScope = new NameScope();

            NameScope.SetNameScope(this, nameScope);
            NameScope.SetNameScope(grid, nameScope);
            NameScope.SetNameScope(columnDefinition, nameScope);
            NameScope.SetNameScope(columnDefinition2, nameScope);
            NameScope.SetNameScope(rowDefinition, nameScope);
            NameScope.SetNameScope(label, nameScope);
            ((INameScope)nameScope).RegisterName("label", label);
            if (label.StyleId == null)
            {
                label.StyleId = "label";
            }
            NameScope.SetNameScope(noBorderEntry, nameScope);
            ((INameScope)nameScope).RegisterName("entry", noBorderEntry);
            if (noBorderEntry.StyleId == null)
            {
                noBorderEntry.StyleId = "entry";
            }
            this.label = label;
            this.entry = noBorderEntry;
            grid.SetValue(VisualElement.BackgroundColorProperty, Color.White);
            grid.SetValue(Grid.RowSpacingProperty, 5.0);
            grid.SetValue(Layout.PaddingProperty, new Thickness(10.0, 5.0, 10.0, 5.0));
            columnDefinition.SetValue(ColumnDefinition.WidthProperty, new GridLengthTypeConverter().ConvertFromInvariantString("*"));
            grid.GetValue(Grid.ColumnDefinitionsProperty).Add(columnDefinition);
            columnDefinition2.SetValue(ColumnDefinition.WidthProperty, new GridLengthTypeConverter().ConvertFromInvariantString("3*"));
            grid.GetValue(Grid.ColumnDefinitionsProperty).Add(columnDefinition2);
            rowDefinition.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("Auto"));
            grid.GetValue(Grid.RowDefinitionsProperty).Add(rowDefinition);
            BindableObject         bindableObject        = label;
            BindableProperty       fontSizeProperty      = Label.FontSizeProperty;
            IExtendedTypeConverter extendedTypeConverter = new FontSizeConverter();
            string value = "Default";
            XamlServiceProvider xamlServiceProvider = new XamlServiceProvider();
            Type typeFromHandle = typeof(IProvideValueTarget);

            object[] array = new object[0 + 3];
            array[0] = label;
            array[1] = grid;
            array[2] = this;
            xamlServiceProvider.Add(typeFromHandle, new SimpleValueTargetProvider(array, Label.FontSizeProperty));
            xamlServiceProvider.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle2 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver = new XmlNamespaceResolver();

            xmlNamespaceResolver.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver.Add("layout", "clr-namespace:RFID.Layout");
            xamlServiceProvider.Add(typeFromHandle2, new XamlTypeResolver(xmlNamespaceResolver, typeof(NewEntryCell).GetTypeInfo().Assembly));
            xamlServiceProvider.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(16, 20)));
            bindableObject.SetValue(fontSizeProperty, extendedTypeConverter.ConvertFromInvariantString(value, xamlServiceProvider));
            label.SetValue(Label.TextColorProperty, new Color(0.501960813999176, 0.501960813999176, 0.501960813999176, 1.0));
            label.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
            label.SetValue(View.HorizontalOptionsProperty, LayoutOptions.FillAndExpand);
            label.SetValue(Label.HorizontalTextAlignmentProperty, new TextAlignmentConverter().ConvertFromInvariantString("Start"));
            label.SetValue(Grid.ColumnProperty, 0);
            grid.Children.Add(label);
            noBorderEntry.SetValue(VisualElement.BackgroundColorProperty, new Color(0.93725490570068359, 0.93725490570068359, 0.93725490570068359, 1.0));
            BindableObject         bindableObject2        = noBorderEntry;
            BindableProperty       fontSizeProperty2      = Entry.FontSizeProperty;
            IExtendedTypeConverter extendedTypeConverter2 = new FontSizeConverter();
            string value2 = "Default";
            XamlServiceProvider xamlServiceProvider2 = new XamlServiceProvider();
            Type typeFromHandle3 = typeof(IProvideValueTarget);

            object[] array2 = new object[0 + 3];
            array2[0] = noBorderEntry;
            array2[1] = grid;
            array2[2] = this;
            xamlServiceProvider2.Add(typeFromHandle3, new SimpleValueTargetProvider(array2, Entry.FontSizeProperty));
            xamlServiceProvider2.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle4 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver2 = new XmlNamespaceResolver();

            xmlNamespaceResolver2.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver2.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver2.Add("layout", "clr-namespace:RFID.Layout");
            xamlServiceProvider2.Add(typeFromHandle4, new XamlTypeResolver(xmlNamespaceResolver2, typeof(NewEntryCell).GetTypeInfo().Assembly));
            xamlServiceProvider2.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(17, 79)));
            bindableObject2.SetValue(fontSizeProperty2, extendedTypeConverter2.ConvertFromInvariantString(value2, xamlServiceProvider2));
            noBorderEntry.SetValue(Entry.PlaceholderColorProperty, new Color(0.63529413938522339, 0.63529413938522339, 0.63529413938522339, 1.0));
            noBorderEntry.SetValue(Grid.ColumnProperty, 1);
            noBorderEntry.SetValue(Entry.TextColorProperty, new Color(0.501960813999176, 0.501960813999176, 0.501960813999176, 1.0));
            noBorderEntry.SetValue(View.HorizontalOptionsProperty, LayoutOptions.FillAndExpand);
            grid.Children.Add(noBorderEntry);
            this.View = grid;
        }
コード例 #25
0
ファイル: MinePage.cs プロジェクト: XiaoBaiXJ/RFID
        private void InitializeComponent()
        {
            if (ResourceLoader.ResourceProvider != null && ResourceLoader.ResourceProvider(typeof(MinePage).GetTypeInfo().Assembly.GetName(), "Views/MinePage.xaml") != null)
            {
                this.__InitComponentRuntime();
                return;
            }
            if (XamlLoader.XamlFileProvider != null && XamlLoader.XamlFileProvider(base.GetType()) != null)
            {
                this.__InitComponentRuntime();
                return;
            }
            RowDefinition      rowDefinition      = new RowDefinition();
            RowDefinition      rowDefinition2     = new RowDefinition();
            RowDefinition      rowDefinition3     = new RowDefinition();
            BindingExtension   bindingExtension   = new BindingExtension();
            Image              image              = new Image();
            BindingExtension   bindingExtension2  = new BindingExtension();
            CircleImage        circleImage        = new CircleImage();
            BindingExtension   bindingExtension3  = new BindingExtension();
            Label              label              = new Label();
            BindingExtension   bindingExtension4  = new BindingExtension();
            Label              label2             = new Label();
            StackLayout        stackLayout        = new StackLayout();
            AbsoluteLayout     absoluteLayout     = new AbsoluteLayout();
            Frame              frame              = new Frame();
            BindingExtension   bindingExtension5  = new BindingExtension();
            DataTemplate       dataTemplate       = new DataTemplate();
            ListView           listView           = new ListView();
            Frame              frame2             = new Frame();
            TranslateExtension translateExtension = new TranslateExtension();
            BindingExtension   bindingExtension6  = new BindingExtension();
            Button             button             = new Button();
            Grid              grid              = new Grid();
            ScrollView        scrollView        = new ScrollView();
            BindingExtension  bindingExtension7 = new BindingExtension();
            BindingExtension  bindingExtension8 = new BindingExtension();
            ActivityIndicator activityIndicator = new ActivityIndicator();
            Grid              grid2             = new Grid();
            NameScope         nameScope         = new NameScope();

            NameScope.SetNameScope(this, nameScope);
            NameScope.SetNameScope(grid2, nameScope);
            NameScope.SetNameScope(scrollView, nameScope);
            NameScope.SetNameScope(grid, nameScope);
            NameScope.SetNameScope(rowDefinition, nameScope);
            NameScope.SetNameScope(rowDefinition2, nameScope);
            NameScope.SetNameScope(rowDefinition3, nameScope);
            NameScope.SetNameScope(frame, nameScope);
            NameScope.SetNameScope(absoluteLayout, nameScope);
            NameScope.SetNameScope(image, nameScope);
            NameScope.SetNameScope(stackLayout, nameScope);
            NameScope.SetNameScope(circleImage, nameScope);
            NameScope.SetNameScope(label, nameScope);
            NameScope.SetNameScope(label2, nameScope);
            NameScope.SetNameScope(frame2, nameScope);
            NameScope.SetNameScope(listView, nameScope);
            ((INameScope)nameScope).RegisterName("listview", listView);
            if (listView.StyleId == null)
            {
                listView.StyleId = "listview";
            }
            NameScope.SetNameScope(button, nameScope);
            NameScope.SetNameScope(activityIndicator, nameScope);
            this.listview = listView;
            this.SetValue(NavigationPage.HasNavigationBarProperty, false);
            grid.SetValue(Xamarin.Forms.Layout.PaddingProperty, new Thickness(10.0));
            grid.SetValue(Grid.RowSpacingProperty, 10.0);
            rowDefinition.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("Auto"));
            grid.GetValue(Grid.RowDefinitionsProperty).Add(rowDefinition);
            rowDefinition2.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("Auto"));
            grid.GetValue(Grid.RowDefinitionsProperty).Add(rowDefinition2);
            rowDefinition3.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("Auto"));
            grid.GetValue(Grid.RowDefinitionsProperty).Add(rowDefinition3);
            frame.SetValue(Grid.RowProperty, 0);
            frame.SetValue(Frame.HasShadowProperty, false);
            frame.SetValue(Frame.CornerRadiusProperty, 10f);
            frame.SetValue(VisualElement.BackgroundColorProperty, Color.Black);
            frame.SetValue(Frame.BorderColorProperty, Color.Black);
            frame.SetValue(Xamarin.Forms.Layout.PaddingProperty, new Thickness(0.0));
            absoluteLayout.SetValue(Xamarin.Forms.Layout.PaddingProperty, new Thickness(0.0));
            absoluteLayout.SetValue(View.HorizontalOptionsProperty, LayoutOptions.FillAndExpand);
            absoluteLayout.SetValue(View.VerticalOptionsProperty, LayoutOptions.FillAndExpand);
            image.SetValue(Image.AspectProperty, Aspect.AspectFill);
            bindingExtension.Path = "Background";
            BindingBase binding = ((IMarkupExtension <BindingBase>)bindingExtension).ProvideValue(null);

            image.SetBinding(Image.SourceProperty, binding);
            image.SetValue(AbsoluteLayout.LayoutBoundsProperty, new Rectangle(0.0, 0.0, 1.0, 1.0));
            image.SetValue(AbsoluteLayout.LayoutFlagsProperty, AbsoluteLayoutFlags.All);
            absoluteLayout.Children.Add(image);
            stackLayout.SetValue(VisualElement.BackgroundColorProperty, Color.Transparent);
            stackLayout.SetValue(AbsoluteLayout.LayoutBoundsProperty, new Rectangle(0.5, 0.5, -1.0, -1.0));
            stackLayout.SetValue(AbsoluteLayout.LayoutFlagsProperty, AbsoluteLayoutFlags.PositionProportional);
            bindingExtension2.Path = "UserIcon";
            BindingBase binding2 = ((IMarkupExtension <BindingBase>)bindingExtension2).ProvideValue(null);

            circleImage.SetBinding(Image.SourceProperty, binding2);
            circleImage.SetValue(VisualElement.HeightRequestProperty, 80.0);
            circleImage.SetValue(VisualElement.WidthRequestProperty, 80.0);
            circleImage.SetValue(Image.AspectProperty, Aspect.AspectFit);
            stackLayout.Children.Add(circleImage);
            label.SetValue(Label.TextColorProperty, Color.White);
            BindableObject         bindableObject        = label;
            BindableProperty       fontSizeProperty      = Label.FontSizeProperty;
            IExtendedTypeConverter extendedTypeConverter = new FontSizeConverter();
            string value = "Large";
            XamlServiceProvider xamlServiceProvider = new XamlServiceProvider();
            Type typeFromHandle = typeof(IProvideValueTarget);

            object[] array = new object[0 + 8];
            array[0] = label;
            array[1] = stackLayout;
            array[2] = absoluteLayout;
            array[3] = frame;
            array[4] = grid;
            array[5] = scrollView;
            array[6] = grid2;
            array[7] = this;
            xamlServiceProvider.Add(typeFromHandle, new SimpleValueTargetProvider(array, Label.FontSizeProperty));
            xamlServiceProvider.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle2 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver = new XmlNamespaceResolver();

            xmlNamespaceResolver.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver.Add("circle", "clr-namespace:ImageCircle.Forms.Plugin.Abstractions;assembly=ImageCircle.Forms.Plugin");
            xmlNamespaceResolver.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver.Add("local", "clr-namespace:RFID");
            xamlServiceProvider.Add(typeFromHandle2, new XamlTypeResolver(xmlNamespaceResolver, typeof(MinePage).GetTypeInfo().Assembly));
            xamlServiceProvider.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(25, 62)));
            bindableObject.SetValue(fontSizeProperty, extendedTypeConverter.ConvertFromInvariantString(value, xamlServiceProvider));
            bindingExtension3.Path = "Name";
            BindingBase binding3 = ((IMarkupExtension <BindingBase>)bindingExtension3).ProvideValue(null);

            label.SetBinding(Label.TextProperty, binding3);
            label.SetValue(Label.HorizontalTextAlignmentProperty, new TextAlignmentConverter().ConvertFromInvariantString("Center"));
            stackLayout.Children.Add(label);
            label2.SetValue(Label.TextColorProperty, Color.White);
            BindableObject         bindableObject2        = label2;
            BindableProperty       fontSizeProperty2      = Label.FontSizeProperty;
            IExtendedTypeConverter extendedTypeConverter2 = new FontSizeConverter();
            string value2 = "Medium";
            XamlServiceProvider xamlServiceProvider2 = new XamlServiceProvider();
            Type typeFromHandle3 = typeof(IProvideValueTarget);

            object[] array2 = new object[0 + 8];
            array2[0] = label2;
            array2[1] = stackLayout;
            array2[2] = absoluteLayout;
            array2[3] = frame;
            array2[4] = grid;
            array2[5] = scrollView;
            array2[6] = grid2;
            array2[7] = this;
            xamlServiceProvider2.Add(typeFromHandle3, new SimpleValueTargetProvider(array2, Label.FontSizeProperty));
            xamlServiceProvider2.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle4 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver2 = new XmlNamespaceResolver();

            xmlNamespaceResolver2.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver2.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver2.Add("circle", "clr-namespace:ImageCircle.Forms.Plugin.Abstractions;assembly=ImageCircle.Forms.Plugin");
            xmlNamespaceResolver2.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver2.Add("local", "clr-namespace:RFID");
            xamlServiceProvider2.Add(typeFromHandle4, new XamlTypeResolver(xmlNamespaceResolver2, typeof(MinePage).GetTypeInfo().Assembly));
            xamlServiceProvider2.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(26, 62)));
            bindableObject2.SetValue(fontSizeProperty2, extendedTypeConverter2.ConvertFromInvariantString(value2, xamlServiceProvider2));
            bindingExtension4.Path = "Introduce";
            BindingBase binding4 = ((IMarkupExtension <BindingBase>)bindingExtension4).ProvideValue(null);

            label2.SetBinding(Label.TextProperty, binding4);
            label2.SetValue(Label.HorizontalTextAlignmentProperty, new TextAlignmentConverter().ConvertFromInvariantString("Center"));
            stackLayout.Children.Add(label2);
            absoluteLayout.Children.Add(stackLayout);
            frame.SetValue(ContentView.ContentProperty, absoluteLayout);
            grid.Children.Add(frame);
            frame2.SetValue(Frame.OutlineColorProperty, Color.White);
            frame2.SetValue(Grid.RowProperty, 1);
            frame2.SetValue(Frame.CornerRadiusProperty, 5f);
            frame2.SetValue(VisualElement.BackgroundColorProperty, Color.White);
            frame2.SetValue(Frame.BorderColorProperty, new Color(0.87058824300765991, 0.87058824300765991, 0.87058824300765991, 1.0));
            frame2.SetValue(Xamarin.Forms.Layout.PaddingProperty, new Thickness(0.0));
            listView.SetValue(ListView.RowHeightProperty, 50);
            listView.SetValue(VisualElement.HeightRequestProperty, 203.0);
            listView.SetValue(ListView.SeparatorColorProperty, new Color(0.87058824300765991, 0.87058824300765991, 0.87058824300765991, 1.0));
            listView.SetValue(ListView.SeparatorVisibilityProperty, SeparatorVisibility.Default);
            listView.ItemSelected += this.ListView_ItemSelected;
            bindingExtension5.Path = "MenuSource";
            BindingBase binding5 = ((IMarkupExtension <BindingBase>)bindingExtension5).ProvideValue(null);

            listView.SetBinding(ItemsView <Cell> .ItemsSourceProperty, binding5);
            IDataTemplate dataTemplate2 = dataTemplate;

            MinePage.< InitializeComponent > _anonXamlCDataTemplate_1 <InitializeComponent> _anonXamlCDataTemplate_ = new MinePage.< InitializeComponent > _anonXamlCDataTemplate_1();
            object[]   array3 = new object[0 + 7];
            array3[0] = dataTemplate;
            array3[1] = listView;
            array3[2] = frame2;
            array3[3] = grid;
            array3[4] = scrollView;
            array3[5] = grid2;
            array3[6] = this;
コード例 #26
0
ファイル: LoginPage.cs プロジェクト: XiaoBaiXJ/RFID
        private void InitializeComponent()
        {
            if (ResourceLoader.ResourceProvider != null && ResourceLoader.ResourceProvider(typeof(LoginPage).GetTypeInfo().Assembly.GetName(), "Views/LoginPage.xaml") != null)
            {
                this.__InitComponentRuntime();
                return;
            }
            if (XamlLoader.XamlFileProvider != null && XamlLoader.XamlFileProvider(base.GetType()) != null)
            {
                this.__InitComponentRuntime();
                return;
            }
            TranslateExtension translateExtension  = new TranslateExtension();
            TranslateExtension translateExtension2 = new TranslateExtension();
            BindingExtension   bindingExtension    = new BindingExtension();
            ToolbarItem        toolbarItem         = new ToolbarItem();
            RowDefinition      rowDefinition       = new RowDefinition();
            RowDefinition      rowDefinition2      = new RowDefinition();
            RowDefinition      rowDefinition3      = new RowDefinition();
            ColumnDefinition   columnDefinition    = new ColumnDefinition();
            ColumnDefinition   columnDefinition2   = new ColumnDefinition();
            SvgCachedImage     svgCachedImage      = new SvgCachedImage();
            TranslateExtension translateExtension3 = new TranslateExtension();
            BindingExtension   bindingExtension2   = new BindingExtension();
            NoBorderEntry      noBorderEntry       = new NoBorderEntry();
            Grid               grid                = new Grid();
            Frame              frame               = new Frame();
            ColumnDefinition   columnDefinition3   = new ColumnDefinition();
            ColumnDefinition   columnDefinition4   = new ColumnDefinition();
            SvgCachedImage     svgCachedImage2     = new SvgCachedImage();
            TranslateExtension translateExtension4 = new TranslateExtension();
            BindingExtension   bindingExtension3   = new BindingExtension();
            NoBorderEntry      noBorderEntry2      = new NoBorderEntry();
            Grid               grid2               = new Grid();
            Frame              frame2              = new Frame();
            StackLayout        stackLayout         = new StackLayout();
            TranslateExtension translateExtension5 = new TranslateExtension();
            BindingExtension   bindingExtension4   = new BindingExtension();
            Button             button              = new Button();
            StackLayout        stackLayout2        = new StackLayout();
            Grid               grid3               = new Grid();
            BindingExtension   bindingExtension5   = new BindingExtension();
            BindingExtension   bindingExtension6   = new BindingExtension();
            ActivityIndicator  activityIndicator   = new ActivityIndicator();
            Grid               grid4               = new Grid();
            NameScope          nameScope           = new NameScope();

            NameScope.SetNameScope(this, nameScope);
            NameScope.SetNameScope(toolbarItem, nameScope);
            NameScope.SetNameScope(grid4, nameScope);
            NameScope.SetNameScope(grid3, nameScope);
            NameScope.SetNameScope(rowDefinition, nameScope);
            NameScope.SetNameScope(rowDefinition2, nameScope);
            NameScope.SetNameScope(rowDefinition3, nameScope);
            NameScope.SetNameScope(stackLayout, nameScope);
            NameScope.SetNameScope(frame, nameScope);
            NameScope.SetNameScope(grid, nameScope);
            NameScope.SetNameScope(columnDefinition, nameScope);
            NameScope.SetNameScope(columnDefinition2, nameScope);
            NameScope.SetNameScope(svgCachedImage, nameScope);
            NameScope.SetNameScope(noBorderEntry, nameScope);
            NameScope.SetNameScope(frame2, nameScope);
            NameScope.SetNameScope(grid2, nameScope);
            NameScope.SetNameScope(columnDefinition3, nameScope);
            NameScope.SetNameScope(columnDefinition4, nameScope);
            NameScope.SetNameScope(svgCachedImage2, nameScope);
            NameScope.SetNameScope(noBorderEntry2, nameScope);
            NameScope.SetNameScope(stackLayout2, nameScope);
            NameScope.SetNameScope(button, nameScope);
            NameScope.SetNameScope(activityIndicator, nameScope);
            this.SetValue(VisualElement.BackgroundColorProperty, Color.White);
            this.SetValue(Page.BackgroundImageProperty, "main_bg.png");
            translateExtension.Text = "login";
            IMarkupExtension    markupExtension     = translateExtension;
            XamlServiceProvider xamlServiceProvider = new XamlServiceProvider();
            Type typeFromHandle = typeof(IProvideValueTarget);

            object[] array = new object[0 + 1];
            array[0] = this;
            xamlServiceProvider.Add(typeFromHandle, new SimpleValueTargetProvider(array, Page.TitleProperty));
            xamlServiceProvider.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle2 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver = new XmlNamespaceResolver();

            xmlNamespaceResolver.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver.Add("local", "clr-namespace:RFID");
            xmlNamespaceResolver.Add("svg", "clr-namespace:FFImageLoading.Svg.Forms;assembly=FFImageLoading.Svg.Forms");
            xamlServiceProvider.Add(typeFromHandle2, new XamlTypeResolver(xmlNamespaceResolver, typeof(LoginPage).GetTypeInfo().Assembly));
            xamlServiceProvider.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(10, 5)));
            object title = markupExtension.ProvideValue(xamlServiceProvider);

            this.Title = title;
            translateExtension2.Text = "server";
            IMarkupExtension    markupExtension2     = translateExtension2;
            XamlServiceProvider xamlServiceProvider2 = new XamlServiceProvider();
            Type typeFromHandle3 = typeof(IProvideValueTarget);

            object[] array2 = new object[0 + 2];
            array2[0] = toolbarItem;
            array2[1] = this;
            xamlServiceProvider2.Add(typeFromHandle3, new SimpleValueTargetProvider(array2, MenuItem.TextProperty));
            xamlServiceProvider2.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle4 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver2 = new XmlNamespaceResolver();

            xmlNamespaceResolver2.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver2.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver2.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver2.Add("local", "clr-namespace:RFID");
            xmlNamespaceResolver2.Add("svg", "clr-namespace:FFImageLoading.Svg.Forms;assembly=FFImageLoading.Svg.Forms");
            xamlServiceProvider2.Add(typeFromHandle4, new XamlTypeResolver(xmlNamespaceResolver2, typeof(LoginPage).GetTypeInfo().Assembly));
            xamlServiceProvider2.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(12, 22)));
            object text = markupExtension2.ProvideValue(xamlServiceProvider2);

            toolbarItem.Text      = text;
            toolbarItem.Order     = ToolbarItemOrder.Primary;
            bindingExtension.Path = "ServerCommand";
            BindingBase binding = ((IMarkupExtension <BindingBase>)bindingExtension).ProvideValue(null);

            toolbarItem.SetBinding(MenuItem.CommandProperty, binding);
            this.ToolbarItems.Add(toolbarItem);
            rowDefinition.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("Auto"));
            grid3.GetValue(Grid.RowDefinitionsProperty).Add(rowDefinition);
            rowDefinition2.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("*"));
            grid3.GetValue(Grid.RowDefinitionsProperty).Add(rowDefinition2);
            rowDefinition3.SetValue(RowDefinition.HeightProperty, new GridLengthTypeConverter().ConvertFromInvariantString("Auto"));
            grid3.GetValue(Grid.RowDefinitionsProperty).Add(rowDefinition3);
            stackLayout.SetValue(Grid.RowProperty, 1);
            stackLayout.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
            stackLayout.SetValue(View.HorizontalOptionsProperty, LayoutOptions.Center);
            stackLayout.SetValue(View.MarginProperty, new Thickness(20.0, 0.0, 20.0, 0.0));
            frame.SetValue(Frame.BorderColorProperty, Color.Black);
            frame.SetValue(Frame.CornerRadiusProperty, 10f);
            frame.SetValue(View.HorizontalOptionsProperty, LayoutOptions.FillAndExpand);
            frame.SetValue(Xamarin.Forms.Layout.PaddingProperty, new Thickness(10.0, 0.0, 10.0, 0.0));
            frame.SetValue(Frame.HasShadowProperty, false);
            grid.SetValue(Grid.ColumnSpacingProperty, 10.0);
            columnDefinition.SetValue(ColumnDefinition.WidthProperty, new GridLengthTypeConverter().ConvertFromInvariantString("30"));
            grid.GetValue(Grid.ColumnDefinitionsProperty).Add(columnDefinition);
            columnDefinition2.SetValue(ColumnDefinition.WidthProperty, new GridLengthTypeConverter().ConvertFromInvariantString("*"));
            grid.GetValue(Grid.ColumnDefinitionsProperty).Add(columnDefinition2);
            svgCachedImage.SetValue(View.HorizontalOptionsProperty, LayoutOptions.Center);
            svgCachedImage.SetValue(CachedImage.AspectProperty, Aspect.AspectFit);
            svgCachedImage.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
            svgCachedImage.SetValue(Grid.ColumnProperty, 0);
            svgCachedImage.SetValue(VisualElement.WidthRequestProperty, 24.0);
            svgCachedImage.SetValue(VisualElement.HeightRequestProperty, 24.0);
            svgCachedImage.SetValue(CachedImage.SourceProperty, new FFImageLoading.Forms.ImageSourceConverter().ConvertFromInvariantString("user.svg"));
            grid.Children.Add(svgCachedImage);
            translateExtension3.Text = "user";
            IMarkupExtension    markupExtension3     = translateExtension3;
            XamlServiceProvider xamlServiceProvider3 = new XamlServiceProvider();
            Type typeFromHandle5 = typeof(IProvideValueTarget);

            object[] array3 = new object[0 + 7];
            array3[0] = noBorderEntry;
            array3[1] = grid;
            array3[2] = frame;
            array3[3] = stackLayout;
            array3[4] = grid3;
            array3[5] = grid4;
            array3[6] = this;
            xamlServiceProvider3.Add(typeFromHandle5, new SimpleValueTargetProvider(array3, Entry.PlaceholderProperty));
            xamlServiceProvider3.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle6 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver3 = new XmlNamespaceResolver();

            xmlNamespaceResolver3.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver3.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver3.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver3.Add("local", "clr-namespace:RFID");
            xmlNamespaceResolver3.Add("svg", "clr-namespace:FFImageLoading.Svg.Forms;assembly=FFImageLoading.Svg.Forms");
            xamlServiceProvider3.Add(typeFromHandle6, new XamlTypeResolver(xmlNamespaceResolver3, typeof(LoginPage).GetTypeInfo().Assembly));
            xamlServiceProvider3.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(34, 51)));
            object placeholder = markupExtension3.ProvideValue(xamlServiceProvider3);

            noBorderEntry.Placeholder = placeholder;
            bindingExtension2.Mode    = BindingMode.TwoWay;
            bindingExtension2.Path    = "Username";
            BindingBase binding2 = ((IMarkupExtension <BindingBase>)bindingExtension2).ProvideValue(null);

            noBorderEntry.SetBinding(Entry.TextProperty, binding2);
            BindableObject         bindableObject        = noBorderEntry;
            BindableProperty       fontSizeProperty      = Entry.FontSizeProperty;
            IExtendedTypeConverter extendedTypeConverter = new FontSizeConverter();
            string value = "Default";
            XamlServiceProvider xamlServiceProvider4 = new XamlServiceProvider();
            Type typeFromHandle7 = typeof(IProvideValueTarget);

            object[] array4 = new object[0 + 7];
            array4[0] = noBorderEntry;
            array4[1] = grid;
            array4[2] = frame;
            array4[3] = stackLayout;
            array4[4] = grid3;
            array4[5] = grid4;
            array4[6] = this;
            xamlServiceProvider4.Add(typeFromHandle7, new SimpleValueTargetProvider(array4, Entry.FontSizeProperty));
            xamlServiceProvider4.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle8 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver4 = new XmlNamespaceResolver();

            xmlNamespaceResolver4.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver4.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver4.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver4.Add("local", "clr-namespace:RFID");
            xmlNamespaceResolver4.Add("svg", "clr-namespace:FFImageLoading.Svg.Forms;assembly=FFImageLoading.Svg.Forms");
            xamlServiceProvider4.Add(typeFromHandle8, new XamlTypeResolver(xmlNamespaceResolver4, typeof(LoginPage).GetTypeInfo().Assembly));
            xamlServiceProvider4.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(34, 126)));
            bindableObject.SetValue(fontSizeProperty, extendedTypeConverter.ConvertFromInvariantString(value, xamlServiceProvider4));
            noBorderEntry.SetValue(Grid.ColumnProperty, 1);
            noBorderEntry.SetValue(Entry.TextColorProperty, Color.Black);
            grid.Children.Add(noBorderEntry);
            frame.SetValue(ContentView.ContentProperty, grid);
            stackLayout.Children.Add(frame);
            frame2.SetValue(Frame.BorderColorProperty, Color.Black);
            frame2.SetValue(Frame.CornerRadiusProperty, 10f);
            frame2.SetValue(View.HorizontalOptionsProperty, LayoutOptions.FillAndExpand);
            frame2.SetValue(Xamarin.Forms.Layout.PaddingProperty, new Thickness(10.0, 0.0, 10.0, 0.0));
            frame2.SetValue(Frame.HasShadowProperty, false);
            grid2.SetValue(Grid.ColumnSpacingProperty, 10.0);
            columnDefinition3.SetValue(ColumnDefinition.WidthProperty, new GridLengthTypeConverter().ConvertFromInvariantString("30"));
            grid2.GetValue(Grid.ColumnDefinitionsProperty).Add(columnDefinition3);
            columnDefinition4.SetValue(ColumnDefinition.WidthProperty, new GridLengthTypeConverter().ConvertFromInvariantString("*"));
            grid2.GetValue(Grid.ColumnDefinitionsProperty).Add(columnDefinition4);
            svgCachedImage2.SetValue(View.HorizontalOptionsProperty, LayoutOptions.Center);
            svgCachedImage2.SetValue(CachedImage.AspectProperty, Aspect.AspectFit);
            svgCachedImage2.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
            svgCachedImage2.SetValue(Grid.ColumnProperty, 0);
            svgCachedImage2.SetValue(VisualElement.WidthRequestProperty, 24.0);
            svgCachedImage2.SetValue(VisualElement.HeightRequestProperty, 24.0);
            svgCachedImage2.SetValue(CachedImage.SourceProperty, new FFImageLoading.Forms.ImageSourceConverter().ConvertFromInvariantString("lock.svg"));
            grid2.Children.Add(svgCachedImage2);
            translateExtension4.Text = "password";
            IMarkupExtension    markupExtension4     = translateExtension4;
            XamlServiceProvider xamlServiceProvider5 = new XamlServiceProvider();
            Type typeFromHandle9 = typeof(IProvideValueTarget);

            object[] array5 = new object[0 + 7];
            array5[0] = noBorderEntry2;
            array5[1] = grid2;
            array5[2] = frame2;
            array5[3] = stackLayout;
            array5[4] = grid3;
            array5[5] = grid4;
            array5[6] = this;
            xamlServiceProvider5.Add(typeFromHandle9, new SimpleValueTargetProvider(array5, Entry.PlaceholderProperty));
            xamlServiceProvider5.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle10 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver5 = new XmlNamespaceResolver();

            xmlNamespaceResolver5.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver5.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver5.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver5.Add("local", "clr-namespace:RFID");
            xmlNamespaceResolver5.Add("svg", "clr-namespace:FFImageLoading.Svg.Forms;assembly=FFImageLoading.Svg.Forms");
            xamlServiceProvider5.Add(typeFromHandle10, new XamlTypeResolver(xmlNamespaceResolver5, typeof(LoginPage).GetTypeInfo().Assembly));
            xamlServiceProvider5.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(46, 51)));
            object placeholder2 = markupExtension4.ProvideValue(xamlServiceProvider5);

            noBorderEntry2.Placeholder = placeholder2;
            bindingExtension3.Mode     = BindingMode.TwoWay;
            bindingExtension3.Path     = "Password";
            BindingBase binding3 = ((IMarkupExtension <BindingBase>)bindingExtension3).ProvideValue(null);

            noBorderEntry2.SetBinding(Entry.TextProperty, binding3);
            BindableObject         bindableObject2        = noBorderEntry2;
            BindableProperty       fontSizeProperty2      = Entry.FontSizeProperty;
            IExtendedTypeConverter extendedTypeConverter2 = new FontSizeConverter();
            string value2 = "Default";
            XamlServiceProvider xamlServiceProvider6 = new XamlServiceProvider();
            Type typeFromHandle11 = typeof(IProvideValueTarget);

            object[] array6 = new object[0 + 7];
            array6[0] = noBorderEntry2;
            array6[1] = grid2;
            array6[2] = frame2;
            array6[3] = stackLayout;
            array6[4] = grid3;
            array6[5] = grid4;
            array6[6] = this;
            xamlServiceProvider6.Add(typeFromHandle11, new SimpleValueTargetProvider(array6, Entry.FontSizeProperty));
            xamlServiceProvider6.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle12 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver6 = new XmlNamespaceResolver();

            xmlNamespaceResolver6.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver6.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver6.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver6.Add("local", "clr-namespace:RFID");
            xmlNamespaceResolver6.Add("svg", "clr-namespace:FFImageLoading.Svg.Forms;assembly=FFImageLoading.Svg.Forms");
            xamlServiceProvider6.Add(typeFromHandle12, new XamlTypeResolver(xmlNamespaceResolver6, typeof(LoginPage).GetTypeInfo().Assembly));
            xamlServiceProvider6.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(46, 130)));
            bindableObject2.SetValue(fontSizeProperty2, extendedTypeConverter2.ConvertFromInvariantString(value2, xamlServiceProvider6));
            noBorderEntry2.SetValue(Grid.ColumnProperty, 1);
            noBorderEntry2.SetValue(Entry.TextColorProperty, Color.Black);
            noBorderEntry2.SetValue(Entry.IsPasswordProperty, true);
            grid2.Children.Add(noBorderEntry2);
            frame2.SetValue(ContentView.ContentProperty, grid2);
            stackLayout.Children.Add(frame2);
            grid3.Children.Add(stackLayout);
            stackLayout2.SetValue(View.VerticalOptionsProperty, LayoutOptions.Start);
            stackLayout2.SetValue(Grid.RowProperty, 2);
            stackLayout2.SetValue(StackLayout.SpacingProperty, 15.0);
            stackLayout2.SetValue(View.MarginProperty, new Thickness(20.0, 0.0, 20.0, 40.0));
            BindableObject         bindableObject3        = button;
            BindableProperty       fontSizeProperty3      = Button.FontSizeProperty;
            IExtendedTypeConverter extendedTypeConverter3 = new FontSizeConverter();
            string value3 = "Medium";
            XamlServiceProvider xamlServiceProvider7 = new XamlServiceProvider();
            Type typeFromHandle13 = typeof(IProvideValueTarget);

            object[] array7 = new object[0 + 5];
            array7[0] = button;
            array7[1] = stackLayout2;
            array7[2] = grid3;
            array7[3] = grid4;
            array7[4] = this;
            xamlServiceProvider7.Add(typeFromHandle13, new SimpleValueTargetProvider(array7, Button.FontSizeProperty));
            xamlServiceProvider7.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle14 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver7 = new XmlNamespaceResolver();

            xmlNamespaceResolver7.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver7.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver7.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver7.Add("local", "clr-namespace:RFID");
            xmlNamespaceResolver7.Add("svg", "clr-namespace:FFImageLoading.Svg.Forms;assembly=FFImageLoading.Svg.Forms");
            xamlServiceProvider7.Add(typeFromHandle14, new XamlTypeResolver(xmlNamespaceResolver7, typeof(LoginPage).GetTypeInfo().Assembly));
            xamlServiceProvider7.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(75, 32)));
            bindableObject3.SetValue(fontSizeProperty3, extendedTypeConverter3.ConvertFromInvariantString(value3, xamlServiceProvider7));
            button.SetValue(VisualElement.BackgroundColorProperty, Color.Black);
            button.SetValue(Button.TextColorProperty, Color.White);
            button.SetValue(Button.BorderColorProperty, Color.Black);
            button.SetValue(Button.BorderWidthProperty, 1.0);
            button.SetValue(Button.BorderRadiusProperty, 5);
            translateExtension5.Text = "login";
            IMarkupExtension    markupExtension5     = translateExtension5;
            XamlServiceProvider xamlServiceProvider8 = new XamlServiceProvider();
            Type typeFromHandle15 = typeof(IProvideValueTarget);

            object[] array8 = new object[0 + 5];
            array8[0] = button;
            array8[1] = stackLayout2;
            array8[2] = grid3;
            array8[3] = grid4;
            array8[4] = this;
            xamlServiceProvider8.Add(typeFromHandle15, new SimpleValueTargetProvider(array8, Button.TextProperty));
            xamlServiceProvider8.Add(typeof(INameScopeProvider), new NameScopeProvider
            {
                NameScope = nameScope
            });
            Type typeFromHandle16 = typeof(IXamlTypeResolver);
            XmlNamespaceResolver xmlNamespaceResolver8 = new XmlNamespaceResolver();

            xmlNamespaceResolver8.Add("", "http://xamarin.com/schemas/2014/forms");
            xmlNamespaceResolver8.Add("x", "http://schemas.microsoft.com/winfx/2009/xaml");
            xmlNamespaceResolver8.Add("layout", "clr-namespace:RFID.Layout");
            xmlNamespaceResolver8.Add("local", "clr-namespace:RFID");
            xmlNamespaceResolver8.Add("svg", "clr-namespace:FFImageLoading.Svg.Forms;assembly=FFImageLoading.Svg.Forms");
            xamlServiceProvider8.Add(typeFromHandle16, new XamlTypeResolver(xmlNamespaceResolver8, typeof(LoginPage).GetTypeInfo().Assembly));
            xamlServiceProvider8.Add(typeof(IXmlLineInfoProvider), new XmlLineInfoProvider(new XmlLineInfo(75, 145)));
            object text2 = markupExtension5.ProvideValue(xamlServiceProvider8);

            button.Text            = text2;
            bindingExtension4.Path = "LoginCommand";
            BindingBase binding4 = ((IMarkupExtension <BindingBase>)bindingExtension4).ProvideValue(null);

            button.SetBinding(Button.CommandProperty, binding4);
            stackLayout2.Children.Add(button);
            grid3.Children.Add(stackLayout2);
            grid4.Children.Add(grid3);
            activityIndicator.SetValue(View.VerticalOptionsProperty, LayoutOptions.Center);
            activityIndicator.SetValue(View.HorizontalOptionsProperty, LayoutOptions.Center);
            bindingExtension5.Path = "IsBusy";
            BindingBase binding5 = ((IMarkupExtension <BindingBase>)bindingExtension5).ProvideValue(null);

            activityIndicator.SetBinding(ActivityIndicator.IsRunningProperty, binding5);
            bindingExtension6.Path = "IsBusy";
            BindingBase binding6 = ((IMarkupExtension <BindingBase>)bindingExtension6).ProvideValue(null);

            activityIndicator.SetBinding(VisualElement.IsVisibleProperty, binding6);
            grid4.Children.Add(activityIndicator);
            this.SetValue(ContentPage.ContentProperty, grid4);
        }