-
WPF coding mutually exclusive Check Boxes with Data Binding
Last week I was coding a View that required for me to show two ChekBox controls which were mutually exclusive in the same way that two or more RadioButton controls that belong to the same group would interact.
My problem was that one Boolean property which came from a bit column in the database needed to drive which CheckBox would be checked: “Yes” or “No”.
In this example I attempt to show how to code two mutually exclusive checkboxes while binding to the Boolean property described above:
The Name of the Property in the Code Behind file that we are going to bind to is AddInsurance.
Here is the XAML code:
-
Creating a Singleton (Instance) Class in C#
In application development there are various situations in which it makes sense to code a class in a manner that it can be created (instantiated) once and used throughout the lifetime of the application. Generally this type of class is called a Singleton object.
When creating and object, CPU cycles are used up during the:
- Creation of the Object
- Initialization of the Object
- Loading of the Object, including seed data from the dB etc.
-
How to uninstall the Zugo Toolbar
I was reading a post on ReadWriteWeb that lists Facebook’s top advertisers in 2010.
The number 3 Facebook advertiser on the list is a company that somewhat misleads people into installing a browser toolbar that is not easy to uninstall. I will let you read more about Facebook’s 3rd Biggest Advertiser in 2010 on your own.
If you are one of those people that does not know how to uninstall the Zugo Toolbar, here is a link to the Zugo website that may solve your problem: http://www.zugo.com/uninstall/
Good luck.
-
Include Application Name in Connection Strings
In addition to the SQL Server, Database, User ID and Password, you may want to include the Application Name in your connection string parameters. Application Name is an optional argument, but it can greatly help you to segregate the SQL that your application is executing from any other database calls that are being sent from other applications/processes.
Data Source=myServer;
Initial Catalog=myDB;
User Id=myUsername;
Password=myPassword;
Application Name=myApp;In example: