Category: "Xamarin"
Xamarin Error:Failed to load output manifest for actool for the file
I copied over my project from Visual Studio to Xarmarin Studio. Then I got an error with the message:Failed to load output manifest for actool for the file. I tried to modify some files, that doesn't work. I found this way is foolish. Actually, I need to clean my solution file, the error has gone!
Xamarin Tips: Xamarin Forms Checkbox
There are no checkbox controls in Xamarin Forms. You can build the custom components with the custom renderers for this purpose. That is very complex. I chose to use a simpler way, using an Image control and TapGestureRecognizer. If the image is checked, then print the checked image, otherwise, just print an empty square. That is easy.
Code
this.chkbox.GestureRecognizers.Add(new TapGestureRecognizer | |
{ | |
TappedCallback = (v, o) => | |
{ | |
if (!checked) | |
{ | |
chkbox.source = ImageSource.FromFile("checked.png"); | |
checked = true; | |
} else{ | |
chkbox.source = ImageSource.FromFile("unchecked.png"); | |
checked =false; | |
} | |
} |
Xamarin Tips: Visual Studio is not responding after stoping an iOS app.
I found there are a number of times, in Visual Studio, when I stopped an iOS app. My visual studio became not responding and holding up for more than a minute. I found the issue, that may be because of I used a Mac Book and a real PC(not a VM) to build, there may have network issues. The issue is between iOS build host and Visual Studio. After I close iOS Build Host, and open it again, then visual studio is working normally.
Xamarin : Access style in the code behind
I defined all styles in app.xaml, which is a kind of css style and that is the centralised place to manage the look and feel. I think that is a good practice. That is no problems to access the style across other xaml file. But in code behind, how do I get it working
That is simple,
Code
txt.Style= (Style) Application.Current.Resources["name"] |
Please don't user only Resources["name"] which is only calling Resources Dictionary in your local xaml, not global app.xaml. You will get a NullReferenceException
Disable Scroll Bar in ListView
I am building an app which has a number of listviews, for some phone it will be longer than its screen. So a global scroll bar are required. However, the listview has their own scrollbar bar, It will make scrolling some strange! Thus, I need to disable all scrollbar, only leaving the global bar.
There are no properties in ListView control to disable its scroll bars. The only way to do that is set HeightRequest to a super big number.
I wish in their future version can have this useful feature.