I'm using xamarin to build an app android and ios and have noticed that some buttons, webviews and some other elements has a kind of shadow while page is being created and then this "shadow" disappears and everything is fine. It seems to occur with transparent elements and I could fix it by giving negative padding or margin, but it's really annoying and not elegant solution. Does anyone here knows what is happening? I almost forget, this tests are being performed on android, I don't know yet if iOs has same issue.
You guys can see below, the "shadow" is at right of the button(it has transparent background):
After Android 5.0, the default button control on the system will have a shadow,if you don't need the shadow .you could define in your activity theme like below :
<item name="buttonStyle">#style/Widget.AppCompat.Button.Borderless</item>
Related
I have just finished developing a cross platform xamarin app. When I tried to submit my app to apple store there were errors. I think when I was fixing them, I changed something and the screens changed for iOS. Fonts, pictures, keyboard etc.. sizes have grown. It is like the resolution decreased. However there is nothing changed about android side, everything is same. Here are two screen shot before - after. If you know what is the problem, can you let me know it?
As James said at comments, the problem was about splash screen. I changed it to default and everything fixed.
I am testing the app which I am currently working on. I have tested it on android 10" tablet and a 4" device. There are many design changes which I encountered.
I have used a master details concept of menu system, on 4" phone the menu is always closed and have put a menu icon to expand it, but on larger screen device(10") the menu bar is always open by default.
Secondly on a 10" tab the form is center aligned and has slight gap to left and right while on 4" it looks great without any margin.
How do I fix these issues?
You can control the master / detail behavior using the MasterBehavior property. Though, how it is currently set up sounds like good default behavior to me, and is likely intended.
I would guess that the padding is similar: one for a larger screen, one for smaller. You can control this by checking and changing the values at runtime. Xamarin.Forms.Device.Idiom property would likely be of use. Detecting the screen size might also be helpful.
I'm getting started with Xamarin using Visual Studio 2013 trying to build an iOS app. I have added a launch screen as an XIB file and the default one they give you (as per the tutorials) just has a few labels and when run on the simulator appears fine.
In the designer when I double click on the XIB, the app view to add components to is square, rather than rectangular and vertical as I would expect for an iPhone display. But the default XIB seems to work.
However I have added a UIView and an image to this, told it to fill the width and height, added two labels in the middle and run it. The displayed image is square and goes off the screen of the simulator, as do the labels. It is not automatically resizing to fill the displayed screen as I would hope.
Basically what I want to know is how to start building basic views with resizable components that will work on any device you use. Can anyone please link me to a tutorial for this using Visual Studio Xamarin for iOS as I don't know what to search for.
What it looks like in designer
How it comes out in simulator
Trying to figure out how MediaTransportControlsHelper.DropoutOrder works when attaching a custom MediaTransportControl to a MediaElement in C# UWP and having a little trouble.
I assumed that if say, I had 4 buttons in my custom MediaTransportControl and I resized the app so that only 3 fit, the last (MediaTransportControlsHelper.DropoutOrder="4") button would 'drop out' to some overflow menu (CommandBar.SecondaryCommands?) - but I'm not seeing this is the case.
Anyone have any idea how to achieve this? Or any samples on hand to guide me?
Thanks.
I have hosted the VLC.DotNet windows Control in a WindowsFormsHost element, inside a WPF window. The reason behind doing this, instead of using Vlc.DotNet WPF control is because the performance of the WinForms version is twice better than the WPF version.
Anyway, everything works fine, except for one annoying detail; When using the WinForms version inside a WinForms App, the rendered video will exactly fit the control; However, using the same control inside a WindowsFormsHost element, causes the video to be rendered as it's original size and not fitted to the control.
There are 2 things to notice here :
The WinForms control is exactly the same, so in my opinion, this behavior could not be related to it.
Using Spy++ I've managed to see when the control is used inside a WinForms App, the rectangle of the rendered video is exactly the same size as the rectangle of the Control itself, But when used in WPF App, the recatngle of the video (which is rendered by VLC and I have no control on it) is not the same size as the control. Instead, it has the same size as the video itself.
Anyone has any particular ideas on why WPF is showing this strange behavior?
Any suggestions would be appreciated.
Thanks a lot folks.
Finally, I managed to find out what was causing the problem and resolved it!
I should confess that the problem was not even remotely related to the first 2000 things that comes to mind in these situations! Instead, it was related to the most ridiculous thing that never happened to catch my eye! Well, as they say, it's always in the last place you look!
As weird as it may sound, the problem was related to video scaling! I needed to scale the video and apparently, when you set scaling in vlc, the video wont get fitted to container anymore.
That was it!