Error 255 after I installed Visual Studio 2015
This week, I installed Visual Studio 2015 in my laptop. Then all of websites I build which is running .Net Framework 4.5 or 4.5.x are not working. They got .net framework error Error 255 and it cannot execute vbc.exe. I did a lot of research. There are a lot of people wrote about this error is about App Pool Identity. They are right in the past, I found out if you have .net framework 4.5 an 4.6, this error is caused by some security patched, 3098779 and 3097997. If you uninstall these two patches, then you will be fine again.
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