//protected Visibility NativeComputedHorizontalScrollBarVisibility //{ // get // { // return ((NativeScrollViewer)this.ContentNativeUIElement).VerticalScrollBarEnabled; // } // set // { // } //} //protected Visibility NativeComputedVerticalScrollBarVisibility //{ // get // { // return ((NativeScrollViewer)this.ContentNativeUIElement).VerticalScrollBarEnabled; // } // set // { // } //} protected override View CreateDefaultControl(string value) { var innerDefaultControl = new NativeScrollViewer(this.Context); innerDefaultControl.ScrollChanged += innerDefaultControl_ScrollChanged; innerDefaultControl.LayoutParameters = this.CreateLayoutParams(); if (this.Background != null) innerDefaultControl.SetBackgroundDrawable(this.Background.ToDrawable()); var text = new Android.Widget.TextView(this.Context); text.LayoutParameters = this.CreateLayoutParams(); text.Text = value; text.SetSingleLine(true); innerDefaultControl.ChildView = text; this.ContentNativeUIElement = innerDefaultControl; return innerDefaultControl; }
/*Group*/ protected override View CreateLayoutControl(UIElement value) { LogicalTreeHelper.AddLogicalChild(this, value); var innerLayoutControl = new NativeScrollViewer(this.Context); innerLayoutControl.ScrollChanged += innerDefaultControl_ScrollChanged; innerLayoutControl.LayoutParameters = this.CreateLayoutParams(); innerLayoutControl.ChildView = value.NativeUIElement; SetBackground(); this.ContentNativeUIElement = innerLayoutControl; return this.ContentNativeUIElement; }