I'm making a custom gradient tool bar in Xamarin.Forms and I would like it to start showing under the status bar in the android version.
I tried using the first color in the gradient colors as the status bar color but it was too big to feel gradient.
I also tried making the window full screen but it removed all the status icon that I need to view as well
above is how I would like it to look like
In order to put a custom gradient toolbar under the status bar in Android, you will have to Hide the NavigationBar, that can be achieved in xaml by:
NavigationPage.HasNavigationBar="False"
Or in the code-behind:
NavigationPage.SetHasNavigationBar(this, false);
Related
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 have a forms application that has a dark mode. However the Apple information that appears at the top of the display and also the slider bar at the bottom appear to very bright. Is there a way to change the color of these?
The top bar can only be black or white, or if you don't want to see it at all, you can hide it.
The bottom (tab) bar, can be influenced, you can use the Appearance APIs on iOS. For example, in your AppDelegate.cs file add a line like this: UITabBar.Appearance.TintColor = Color.Red.ToUIColor();
There are more advanced scenarios possible, have a look at my blog post about it here: https://blog.verslu.is/xamarin/xamarin-forms-xamarin/spicing-up-your-xamarin-formsios-tabbar/
And the (open) PR on the Xamarin.Forms repo here, which will makes this possible from the Forms framework directly: https://github.com/xamarin/Xamarin.Forms/pull/4899
In app delegates.cs find Finishlaunching method and all following code. Also set the color accordingly.
UINavigationBar.Appearance.BarTintColor = UIColor.FromRGB(190, 18, 40);
UINavigationBar.Appearance.SetTitleTextAttributes(new UITextAttributes { TextColor =
UIColor.Blue});
I am using SWRevealcontroller. I am trying to change the color of the navigation bar depending on the selection of the view.
It will only stay the same color of the initial bar color.
Any help guys? iOS7
You will have each view as a separate class, and then change the navigation bar color programmatically within the viewDidLoadmethod.
I would like to design a NSWindow title bar like the following screenshot,
This is a screen shot of GitHub mac application.Please see the horizontal alignment of windows default Close,minimize and maximize buttons.Those are horizontally aligned with the other buttons like repositories and others.
How Can I achieve the same in my application.I have tried using NSThemeFrame but I can not change the frames of this buttons.
Thank you
Use this custom window to achieve that effect.
I have an MFC dialog (actual a dialog bar with in a dialog) that contains a progress bar with these strange black pixels in the corner. I have tried the following to remove them:
Change most of the border type styles and the transparent style of the control.
Override the OnEraseBkgnd in a class derived a CProgressCtrl.
Setting the background color of the control by PBM_SETBKCOLOR.
I have yet to find a way to remove these black pixel.
Here is an example of what it looks like:
It seems I have found the issue. When the progress bar performs its painting it was sending an WM_ERASEBKGND message to the dialog to get the background with which it would paint. Some how the DC brush origin was being messed up. Using the following code at the start of the function seems to have fixed the issue with no ill effects.
CRect rcClip;
pDC->GetClipBox(rcClip);
pDC->SetBrushOrg(-rcClip.left, -rcClip.top);
I've seen this occur when using ActiveX controls inside control containers that don't have a a window or proper Device Contexts (The VB6 frame control is one of these) but I'm not sure if the same problem applies to MFC windows and controls though.
Try making the control parent a normal static window.