示例#1
0
        protected override EditorGroup CreateEditorGroup(string groupName)
        {
            if (groupName != null)
            {
                var layout = this.renderer.GetGroupLayoutDefinition(groupName);
                var group  = new EditorGroup(this.Context, groupName, Resource.Layout.Custom_Group_Layout);
                group.LayoutManager = TypeMappings.CreateInstance(layout, this.Context) as DataFormLayoutManager;

                if (DarkThemeHelper.IsDarkThemeApplied(this.Context))
                {
                    group.RootLayout().Background = new ColorDrawable(Color.Transparent);
                }
                else
                {
                    group.RootLayout().Background = new ColorDrawable(Color.White);
                }

                return(group);
            }

            return(base.CreateEditorGroup(groupName));
        }
        protected override EditorGroup CreateEditorGroup(string groupName)
        {
            if (groupName != null)
            {
                var layout = this.renderer.GetGroupLayoutDefinition(groupName);
                var group  = new EditorGroup(Xamarin.Forms.Forms.Context, groupName, Resource.Layout.Custom_Group_Layout);
                group.LayoutManager = TypeMappings.CreateInstance(layout) as DataFormLayoutManager;
                group.RootLayout().Background = new ColorDrawable(Color.White);

                return(group);
            }

            return(base.CreateEditorGroup(groupName));
        }