Xamarin: avoid lighter effect on iOS navigationBar - xamarin

In my custom NavigationRender, I need an image as background of navigation bar.
I use this line to do that:
this.NavigationBar.BarTintColor = UIColor.FromPatternImage(UIImage.FromFile("myImmage"));
this.NavigationBar.Translucent = false;
It works, but image appear lighter than the original one due to a blur efefct added on navigation.
Is there a way to avoid it?

Related

How to do a scale open animation in Flutter?

I'm trying to do this animation in flutter :
https://material.io/guidelines/motion/choreography.html#choreography-creation
My problem is that I have absolutely no idea how to do that.
As far as I know, widgets in flutter don't know their position nor the position or other widgets at all.
And you can't access context.size inside the build method.
I tried to use Hero animation to do it. Or ScaleTransition. But it's definitely not working.
You can use showMenu to dynamically show a popup menu at a given location. Consider using PopupMenuButton, which is an IconButton that automatically shows a menu when it is tapped. There's an example in the Gallery. If showMenu doesn't do what you want, you can copy the code in popup_menu.dart and customize it to make your own version. It uses CustomSingleChildLayout and PopupRoute.
If you just want to absolutely position a Material or Card on top of other elements, you can give it some elevation and use a Positioned within a Stack. You can use an AnimatedSize to adjust the element's size with a Curve. This won't interact with the back button on Android automatically, so if you want that, you may have to use addLocalHistoryEntry or PopupRoute.
If I understand you correct - you want to show square widget, and animation is not suitable at most because widget doesn't know its size.
In this case you can try MediaQuery.of(context).size.width - it returns width of your screen, so you can use it for calculating widgets size

How to get background images to scale to the same size in Xcode Autolayout?

The Problem:
I am currently trying to get the background image of launch page of my app and the first view controller to match in size.
On left, launch screen on the right first view controller.
However as you can see the navigation bar appears to resize the background image.
Both back ground images are currently set to centre vertically and horizontally and both have equal width and height to the view.
What Ive tried
I have obviously tried messing around with auto layout to now avail,
I have also tried toggling the Extend Edges “under Top Bars” option, it is currently set to true in the above image. This didn't work either.
Question
How do I get both background images to have the same sizes (consistent) between the launch screen and the first view controller, for all iPhone devices (in auto layout)?
Found the answer for anyone with this problem.
Tick extend edges under Opaque bars for the view controller.

Place opacityMask over panorama background, but not its contents

I want to create a mask effect so I place a mask over my panorama page, but this would place a mask on my entire screen. How can I make it so that it would only place on top of my panorama background but under my panoramaitems?
You could retemplate the the Panorama control to add the mask over the background image.
I've found some issues with doing this in Mango though and so have chosen to manipulate the background image directly. This also led to code which was simpler to follow. (In my opinion.)

WP7 background blur effect

I need to know, which is the best way to blur the background of the Windows Phone 7 app to concentrate the user's attention on a "always on top" popup window.
My idea is:
Make an in-memory screenshot of the background grid (by turning it into a freezable or something).
Add an image that overlaps the background grid, but is below (with the z-index) the popup.
Still I doubt I will be able to overlap the application bar.
At this point, if you have a solution, please advise.
A few pointers for you ...
Unfortunately the Silverlight BlurEffect and other Bitmap effects didn't make it into Window Phone 7, so you will have to implement the blur yourself. This is actually pretty simple, just use a Gaussian Convolution Filter.
To achieve this effect you can capture the visuals of your application into a WriteableBitmap, manipulate the image to create your blur, then overlay this image over your application using a PopUp. I did something similar in a blog post I wrote about fly-out text animations here:
http://www.scottlogic.co.uk/blog/colin/2011/04/metro-in-motion-3-flying-titles/
Find your root visual as follows:
var rootElement = Application.Current.RootVisual as FrameworkElement;
Add a copy of this UI into a popup as follows:
_backgroundMask = new Rectangle()
{
Fill = new SolidColorBrush(Colors.Black),
Opacity = 0.0,
Width = rootElement.ActualWidth,
Height = rootElement.ActualHeight
};
_popupCanvas.Children.Add(_backgroundMask);
_targetElementClone = new Image()
{
Source = new WriteableBitmap(element, null)
};
_popupCanvas.Children.Add(_targetElementClone);
And show it:
_popup.IsOpen = true;
I'll leave you to work out how to blur the background!
As an aside, your will not be able to overlay or capture the application bar visuals. Hide it before performing this transformation.
Finally, blurring the background isn't really very 'Metro'. Are you sure you want to do this?
Instead of blurring just use a semi transparent layer over the top of the page.
You should hide the application bar before trying to create such an effect as you won't be able to place anything on top of it.

How to make an image as transparent in BlackBerry?

I am new to BlackBerry Java application development. My scenario is: In my application a gallery list of images will be displayed in a small icons. If I click on any image it will display in a large mode. Here I need to provide controls like front and back buttons. On clicking on those buttons the background image should change. In addition to that those buttons should be highlighted and the back ground large image should be transparent. How to do this?
Please guide me.
You can use Graphics.setGlobalAlpha() on paint() or to modify bitmap before preview.
Don't forget to set back normal global alpha value after bitmap drawing.

Resources