Problem
Had a number of UITextView controls on my Xamarin/C# screen. Customer asked for one of them to be underlined. I was unsure of how to accomplish this.
Solution
Fortunately, Guillermo over at Xamarin Forums had a similar solution for UILabel. Here is my reworked solution.
UITextView aboutTextView = new UITextView(new RectangleF(30,225,280,80));
aboutTextView.TextColor = UIColor.Black;
var attrString = new NSAttributedString("The Text",
underlineStyle: NSUnderlineStyle.Single);
aboutTextView.AttributedText = attrString;
aboutTextView.Font = UIFont.SystemFontOfSize(14.0f);
Add(aboutTextView);
Source:
http://forums.xamarin.com/discussion/11584/how-to-add-strikeout-strikethrough-to-an-uilabel
This missive records my trials and tribulations as I code my way through projects. Fix the problem once and reuse the solution!
Friday, June 26, 2015
Tuesday, June 23, 2015
Localized Strings does not exist in namespace
Problem:
Having completed the iPhone version of our MVVM cross project, we are back to the Windows Phone version. I created the baseline phone project and added reference to the Core. Then I built the Windows Phone 8 project and kept getting this error:
The name "LocalizedStrings" does not exist in the namespace
Solution:
Close Visual Studio. Than, delete sub folders 10.0 and 11.0 from "%LOCALAPPDATA%\Microsoft\Phone Tools\CoreCon\" Open Visual Studio and rebuild solution.
Where
%LOCALAPPDATA% = C:\Users\[USER]\AppData\Local
Source:
http://stackoverflow.com/questions/23237549/vs-2013-the-name-localizedstrings-does-not-exist-in-the-namespace
Having completed the iPhone version of our MVVM cross project, we are back to the Windows Phone version. I created the baseline phone project and added reference to the Core. Then I built the Windows Phone 8 project and kept getting this error:
The name "LocalizedStrings" does not exist in the namespace
Solution:
Close Visual Studio. Than, delete sub folders 10.0 and 11.0 from "%LOCALAPPDATA%\Microsoft\Phone Tools\CoreCon\" Open Visual Studio and rebuild solution.
Where
%LOCALAPPDATA% = C:\Users\[USER]\AppData\Local
Source:
http://stackoverflow.com/questions/23237549/vs-2013-the-name-localizedstrings-does-not-exist-in-the-namespace
Monday, June 15, 2015
Populate an array
I needed a quick array of the integers to represent calendar years for use with a phone app.
The solution was quite simple using the range.enumerate method
DateTime start = DateTime.Now.AddYears(-40);
DateTime end = DateTime.Now.AddYears(40);
return Enumerable.Range(start.Year, end.Year - start.Year).ToArray();
The solution was quite simple using the range.enumerate method
DateTime start = DateTime.Now.AddYears(-40);
DateTime end = DateTime.Now.AddYears(40);
return Enumerable.Range(start.Year, end.Year - start.Year).ToArray();
Friday, June 12, 2015
Problem Step Recorder
Microsoft PFE turned me onto this little tool built in to windows.
Run>psr
This bring up the problem step recorder. This will record a session with screen caps and comments. This eases the whole documentation rig-a-moroll.
Run>psr
This bring up the problem step recorder. This will record a session with screen caps and comments. This eases the whole documentation rig-a-moroll.
IOS iPhone Simulator killing a running app
Problem:
Running my new app in the simulator and each time I start it up it defaults to the latest screen.
This is by design as it starts up where you left off. I need to give a demo and need to get it to start at their first screen. How do I kill the session in memory?
Solution:
For iOS 7 & 8:
http://stackoverflow.com/questions/18519799/ios-simulator-how-to-close-an-app
Running my new app in the simulator and each time I start it up it defaults to the latest screen.
This is by design as it starts up where you left off. I need to give a demo and need to get it to start at their first screen. How do I kill the session in memory?
Solution:
For iOS 7 & 8:
- shift+command+H twice to simulate the double tap of home button
- swipe your app's screenshot upward to close it
http://stackoverflow.com/questions/18519799/ios-simulator-how-to-close-an-app
Wednesday, June 3, 2015
SSL cert binding in IIS 7.5
Trying to add an SSL Binding in IIS 7.5 with the GUI and realized that there is a bug in the process.
If you use the GUI the cert will be installed incorrectly. Use the following command lines to install your cert correctly.
Run the following commands from the C:\Windows\System32\inetsrv directory:
If you use the GUI the cert will be installed incorrectly. Use the following command lines to install your cert correctly.
Run the following commands from the C:\Windows\System32\inetsrv directory:
1. Open powershell as admin
2. Open netsh shell and Issue http verb
• Netsh
• http
• nesh http> add sslcert ipport=XXX.XXX.XXX.171:443 appid={4dc3e181-e14b-4a21-b022-59fc669b0914} certhash=69c04af8588ec65762de96ddd51d78fa6e47c692 certstorename=MY
3. Appcmd set site /site.name:”<SITE_NAME>” /+”bindings.[protocol=’https’,bindingInformation=’<IP_ADDRESS>:443:<HOST_NAME>’]”
Error:
Cannot find site object with the identifier bindingInformation
Fix:
Add double quotes around the bindings command
./appcmd set site /site.name:update.com /+"bindings.[protocol='https',bindingInformation='XXX.XXX.XXX.171:443:update.com']"
Source:
DISA PKI and PKE Tools
This tool allows users to install DoD production PKI, Joint Interoperability
Test Command (JITC) test PKI, and External Certification Authority (ECA) CA
certificates into their Windows and Firefox certificate stores. InstallRoot 4.1
is packaged with a command line version as well as an InstallRoot service, which
can check for updated Trust Anchor Management Protocol (TAMP) messages that
contain the latest certificate information from DoD. The following operating
systems are supported: Windows XP, Windows Vista, Windows 7, Windows 8 and 8.1,
Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server
2008 R2, Windows Server 2012, and Windows Server 2012 R2.
Source:
http://iase.disa.mil/pki-pke/Pages/tools.aspx
- 32-bit Installer - (MSI Download) Size: 8,971 KB
- 64-bit Installer - (MSI Download) Size: 9,753 KB
- Non Administrator - (MSI Download) Size: 8,645 KB
Source:
http://iase.disa.mil/pki-pke/Pages/tools.aspx
Subscribe to:
Posts (Atom)