Is it possible to change the ScrollView default color for when a page is completely scrolled up/down?
It seems there is no native property in Xamarin.Forms to do this.
It seems to be called an edge effect for scroll view. At least on Android platform.
Try to add this to android/app/src/res/values/styles.xml:
<item name="android:colorEdgeEffect">#eb4034</item>
*with color you want.
Related
I have a custom NSTextField, named MySearchField. When I put it on the top of NSVisualEffectView and run my app on macOS 11.x, ring focus color of the text field and background color of selected text both turns white.
It seems that there is no API to adjust this in Apple API Reference. But I found the style of search field on Mac App Store is what I want.
So, How should I solve this problem? Any help will be appreciated!
EDIT
Accent color seems to cause this problem. In this case, multicolor is selected. How to specify an accent color for NSTextField?
I am developing a cross-platform application using native-script angular.
In Android, I face the issue in the selected indicator colour in the segmented bar. Anyone Knows how to change the selected indicator colour in the segmented bar. It shows the default color blue.
<SegmentedBar #tabs [items]="myItems" selectedIndex="0" (selectedIndexChange)="onSelectedIndexChange(tabs.selectedIndex)" class="m-5" selectedBackgroundColor="gray" ></SegmentedBar>
In the Segemented bar add the property selectedBackgroundColor="gray"
I don't know what happened. Elements items like buttons or segmented control are invisible in main storyboard. Cellphone is the same.
I put the image, of what I mean
It looks like you accidentally changed the view's (or window's) Tint Color to white. (Or you could even have turned it to Clear color, or no color at all.)
This would cause the text of the button or segmented control to be invisible, because it is white on white. The segmented control has a border but it would turn white too. So you wouldn't be able to see anything.
There are two places to look to fix this. Look at the Tint popup of your view controller's View in the Attributes inspector.
Also look at the Global Tint popup in the File inspector for the whole storyboard.
[EDIT It turned out to be the Global Tint.]
I use Xamarin.Forms, ScrollView, I can change ScrollView.Background, but background color of scroll bar don't change. How I can do it ?
Can I make a universal shared style scrollbar for all platforms?
If you can not, can I make so that I could use ScrollView in Shared project Xamarin.forms but at the same time that it is displayed at
on different platforms with their own style?
Maybe it can be done without their own styles and somehow easier? I need only custom scrollbar color in ScrollView Xamarin.Forms.
I googled but found no examples of the using color of scrollbar Xamarin.forms.
if it is not very easy to do, I would like to use an example code.
The Xamarin.Forms ScrollView control translates to a native scroll control on each platform. What you need to do, is create a custom Effect that gives you access to those underlying controls. From there you can customize the appearance of the scrollbar.
On Android, you need to work with android.widget.ScrollView. You should define a custom drawable for the scrollbar in your resources folder and programmatically change the scrollbar to that inside your effect. There are quite a few answers on StackOverflow that show you how to do it, for example here and here.
On iOS, the native control is UIScrollView from UIKit and the scrollbars are predefined images so you'll probably need to replace the image each time the control updates. Take a look here for a good starting point.
In the end, you'll have something like this in your XAML:
<ScrollView>
<ScrollView.Effects>
<local:ScrollBarColorEffect ScrollBarColor="Green" />
</ScrollView.Effects>
...
I changed the background color for my app, but other elements keep the same background color.
Looks like I missed some easy configuration, bsc for NSTabViewItems item colors is deprecated by docs, and using current theme...
You can't easily adjust the tint of the standard controls. You're going to have to subclass and override the drawing code for each of the elements.
Also, may I humbly suggest that you leave it the default color?
U may use Core Animation layer in IB. Choose your object (for example button),
open the view effects inspector (⎇⌘8), set checkbox with your object, add "content filters"
color monochrome and set color! That is all!