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>
...
Related
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.
Does Glide allow for a horizontal scroll bar as the control UI for sliding through images? Right now I only see button controls, where each button maps to a slide.
Just to be clear I am still definitely interested in swiping behavior of course. I'd just like the button controls to behave like a scroll as well.
If Glide indeed allows for horizontal scrolling for controls can someone share how they implemented this? I cannot seem to find any guidelines in the docs.
We need to implement a horizontal scroll control in Xamarin.Forms, that would not just allow scrolling through items via swipe, but would magnify elements in the row as they approach a center of the scroll control. The design of the layout desired is this:
Thus far I wasn't able to find any control for Xamarin or Xamarin.Forms that implements such behaviour.
Please either provide a hint on how to approach the implementation of such functionality via extending the UIScrollView, or point to a control or example that related to the requirement. Thank you.
You can use the CarouselView, but it's still in the preview. So, the best way to implement it at the moment is to use the CustomRenderers
I have a Cocoa app in which one of my NSOpenGLViews can go into full screen mode (I do this with the method enterFullScreenMode:withOptions:). I would like to create a little widget that when you mouse over it, a toolbar pops up with some different controls. I am wondering what would be the best way to implement this widget? At first I thought about using a panel but I don't think you can bring up any windows when in full screen mode. Also, it seems that you can't add a subview to an NSOpenGLView? Are these two assumptions correct? What else could I use to accomplish this?
I would add a subview to the openglview's superview.
You can't add any subview to NSOpenGLView.
You can use glViewport to simulate subviews.
I am trying to create an interface for my application using Qt Designer. I want it to have a tabbed, ribbon-style set of controls at the top, and a MDI-style area with docked windows which I plan to show and hide depending on which tab of the ribbon is currently selected. I am just beginning with Qt Designer as well as Qt4 itself for that matter so I'm not quite sure how to setup the window, which widgets and layouts should I use etc.
It's quite obvious there should be a QTabWidget at the top, but I'm not sure about the bottom. Should I use a QFrame? A QMdiArea? A dock widget? What layouts can I use to make sure the tab widget has a fixed height, occupies the whole width of the window at all times and the bottom area scales as the window is resized?
I've read in the manual that splitter layouts allow for manual adjustment of the size of the widgets they contain, but I can't drag the box size of a widget after I place them inside a splitter. Thus I'm unable to setup the area below the ribbon. Anyone, help?
You should look into the QMainWindow and check the multiple utilities it can provide you (Toolbar, StatusBar, DockWidgets, CentralWidget, etc...).
The way I understood your case is that you will always have the MDI Area visible, and that the tab bar will only be used to change the dockWidgets. Here's how I would do it.
The centralWidget of the mainWindow would be a QWidget with a QVBoxLayout containing a QTabBar widget first (up) and a QMdiArea under it. The sizes should be handled automatically.
This will allow the user (or you) to dock widgets on the left, bottom, top or right areas of the mainWindow's central widget. Keep pointers to the dockWidgets to be able to move and show/hide them at will.
Hope this helps.
VTK Designer, which is built on Qt, has a Ribbon-ish interface. You might take a look at the source code for reference.