<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">

	<title type="text">Main Content</title>
	<subtitle type="text">Main Content:</subtitle>
	<link rel="alternate" type="text/html" href="http://www.carnali.com/index.php" />
	<link rel="self" type="application/atom+xml" href="http://www.carnali.com/index.php/{atom_feed_location}" />
	<updated>2012-01-08T18:33:21Z</updated>
	<rights>Copyright (c) 2011, Al</rights>
	<generator uri="http://expressionengine.com/" version="2.3.1">ExpressionEngine</generator>
	<id>tag:carnali.com,2011:12:24</id>


	<entry>
	  <title>Amazon in Massachusetts</title>
	  <link rel="alternate" type="text/html" href="http://www.carnali.com/index.php/amazon_in_masschusetts" />
	  <id>tag:carnali.com,2011:index.php/1.49</id>
	  <published>2011-12-24T12:28:20Z</published>
	  <updated>2012-01-08T18:33:21Z</updated>
	  <author>
			<name>Al</name>
			<email>al@carnali.com</email>
				  </author>

	  <category term="Local"
		scheme="http://www.carnali.com/index.php/news/C2"
		label="Local" />
	  <content type="html"><![CDATA[
		<p>An article in today&#8217;s Boston Globe gleefully considers the possiblity that with Amazon moving an office into Cambridge Massachusetts, the state will now be able to force Amazon to collect a 6.25 percent sales tax on all of its&#8217; customers.</p>

<p>It&#8217;s not enough that the move will bring 150 additional jobs in the area, bring people into the city, pay significant real estate taxes and help support local retailers.&nbsp; Nope.&nbsp; The best part, as far as the Globes&#8217; concerned, is the ability to leech some more money off of an already over-taxed population.</p>

<p>The key quote in the article is:</p>

<p> “This is major revenue for states,’’ said Neal Osten, director of the Washington office of the National Conference of State Legislatures. Without a government plan to tax those sales, he said, “that loss will continue to grow, and as more people feel comfortable not paying sales taxes online, they also see it as a right not to pay online sales tax.’</p>

<p>How dare citizens think they have a right to keep their own money!&nbsp; I guess it&#8217;s OK though for the Government to see it as a right to confiscate the earning of citizens and use it to expand an out of control and intrusive Government.</p>

<p>For the last thirty years or so, Governments&#8217; main purpose has become taking money from the productive and redistributing it to an ever growing leech class.&nbsp; In doing so, they also make sure a large portion of the money is siphoned off to build the ever growing bureaucracy.&nbsp; This was not the way the Founders envisioned this country and it&#8217;s really sad that we continue to move in this direction.</p>
	  ]]></content>
	</entry>

	<entry>
	  <title>The Times They Are a&#45;Changin&#8217;</title>
	  <link rel="alternate" type="text/html" href="http://www.carnali.com/index.php/the_times_they_are_a_changin" />
	  <id>tag:carnali.com,2011:index.php/1.48</id>
	  <published>2011-12-18T17:00:45Z</published>
	  <updated>2011-12-18T09:19:46Z</updated>
	  <author>
			<name>Al</name>
			<email>al@carnali.com</email>
				  </author>

	  <category term="Unclassified"
		scheme="http://www.carnali.com/index.php/news/C16"
		label="Unclassified" />
	  <content type="html"><![CDATA[
		<p><center><img src="/images/site_images/posts_images/teenromance.jpg" alt="teen romance image"></center></p>
<p>I remember the good old days when we had categories like mysteries, science fiction and current events at the book store&#8230;</p>


	  ]]></content>
	</entry>

	<entry>
	  <title>The Three Stooges</title>
	  <link rel="alternate" type="text/html" href="http://www.carnali.com/index.php/the_three_stooges" />
	  <id>tag:carnali.com,2011:index.php/1.47</id>
	  <published>2011-12-08T11:51:03Z</published>
	  <updated>2011-12-11T14:58:04Z</updated>
	  <author>
			<name>Al</name>
			<email>al@carnali.com</email>
				  </author>

	  <category term="Cool Stuff"
		scheme="http://www.carnali.com/index.php/news/C15"
		label="Cool Stuff" />
	  <content type="html"><![CDATA[
		<center><iframe width="853" height="480" src="http://www.youtube.com/embed/MFeYUNHtUG0" frameborder="0" allowfullscreen></iframe></center>

<p>I just don&#8217;t get it.&nbsp; I search around the Internet and all I see is negative reviews about this trailer.&nbsp; Everyone is saying it&#8217;s unfunny and simply awful.</p>

<p>I grew up on the Stooges.&nbsp; Every morning before school I would be up a 6:00 AM watching the Stooges.&nbsp; I have a number of episode on DVD and have spent more New Years eve nights then I&#8217;d like to remember, ringing in the New Year with Moe, Larry and Curly.&nbsp; (I know, it&#8217;s kind of pathetic)&nbsp; I would consider myself a Stooges expert.</p>

<p>I had very low expectations for this movie but the trailer is hysterical.&nbsp; Each of the actors impersonations are dead-on and all the bits seem to work.&nbsp; Why do people hate this so much?</p>

<p>I know that nothing will ever replace the original, but this looks like it will be a lot of fun.&nbsp; Mellow out everyone.&nbsp; If you don&#8217;t want to see it, stay home, but I&#8217;ll be there opening night.&nbsp; I can&#8217;t wait for this.</p>
	  ]]></content>
	</entry>

	<entry>
	  <title>Mieders Alpine Coaster</title>
	  <link rel="alternate" type="text/html" href="http://www.carnali.com/index.php/mieders_alpine_coaster" />
	  <id>tag:carnali.com,2011:index.php/1.46</id>
	  <published>2011-12-03T14:17:31Z</published>
	  <updated>2011-12-03T06:19:32Z</updated>
	  <author>
			<name>Al</name>
			<email>al@carnali.com</email>
				  </author>

	  <category term="Cool Stuff"
		scheme="http://www.carnali.com/index.php/news/C15"
		label="Cool Stuff" />
	  <content type="html"><![CDATA[
		<p>Looks like fun&#8230;.</p>

<center><iframe width="640" height="480" src="http://www.youtube.com/embed/iqCkICXWdWI" frameborder="0" allowfullscreen></iframe><p></center></p>
	  ]]></content>
	</entry>

	<entry>
	  <title>People are Crazy</title>
	  <link rel="alternate" type="text/html" href="http://www.carnali.com/index.php/people_are_crazy" />
	  <id>tag:carnali.com,2011:index.php/1.45</id>
	  <published>2011-11-21T22:35:51Z</published>
	  <updated>2011-11-21T14:52:52Z</updated>
	  <author>
			<name>Al</name>
			<email>al@carnali.com</email>
				  </author>

	  <category term="Unclassified"
		scheme="http://www.carnali.com/index.php/news/C16"
		label="Unclassified" />
	  <content type="html"><![CDATA[
		<p>Over the weekend there was a story about a women that was admitted to the hospital complaining of severe abdominal pain, flu-like symptoms and infected sores on her backside.&nbsp; When doctors questioned her about what happened she was at first reluctant to answer but after some additional probing, she admitted to having &#8220;cosmetic surgery.&#8221;</p>

<p>It turns out the &#8220;cosmetic surgery&#8221; was performed by an unlicensed transgender person, by the name of Oneal Ron Morris, who performed the operation by injecting the subject with a combination of fix-a-flat, cement and mineral oil.&nbsp; The incisions were then sealed using Super Glue.&nbsp; Cost of above services were $700 dollars.</p>

<p>OK.&nbsp; I know there are a lot of people out there with little money that would like to have plastic surgery and would consider this their only option.&nbsp; I can understand that.</p>

<p>There are also a lot of incredibly dumb people out there who would think nothing of having a medical procedure done at someones house and would also see nothing wrong with a magic concoction of fix-a-flat, cement and mineral oil injected into their buttock.&nbsp; I can understand that too.</p>

<p>What I can&#8217;t understand is that after meeting the &#8220;doctor&#8217; and finding out he performed the procedure on himself, and is a model of his own work, why you would ever choose to go through with it.</p>

<center><img  src="/images/site_images/posts_images/fixaflat.jpg" alt="fat women"></center>

<p>Good Lord.&nbsp; What is wrong with people?&nbsp; Could anyone really be so stupid or so desperate that this is what they would want for themself?&nbsp; Is this really a look you want to copy?&nbsp; The last time I saw a backside that big was in a comic strip.</p>

<p>&nbsp;</p><center><img class="centerimg" src="/images/site_images/posts_images/bcbroad.jpg" alt="fat women"><p></center></p>
	  ]]></content>
	</entry>

	<entry>
	  <title>New Running Toy</title>
	  <link rel="alternate" type="text/html" href="http://www.carnali.com/index.php/new_running_toy" />
	  <id>tag:carnali.com,2011:index.php/1.44</id>
	  <published>2011-11-13T20:38:30Z</published>
	  <updated>2011-11-13T12:50:31Z</updated>
	  <author>
			<name>Al</name>
			<email>al@carnali.com</email>
				  </author>

	  <category term="What&apos;s Happening"
		scheme="http://www.carnali.com/index.php/news/C13"
		label="What&apos;s Happening" />
	  <content type="html"><![CDATA[
		<p><img class="leftimg" src="/images/site_images/posts_images/petzl.jpg" alt="visual studio image"></p>

<p>I ran 4.12 miles today.&nbsp; Not bad, but no where near what I was doing before I had the lung problem.&nbsp; I was actually up to 17 mile runs before all hell broke loose.</p>

<p>My task this winter is to get back in shape and get to the point where I can run really long distances.&nbsp; My marathon plans fizzled this year but I&#8217;m bound and determined that I&#8217;ll complete a marathon next year.</p>

<p>To aid in achieving my running goals, I just purchased a Petzl E 93 PT Tikka 2 Headlamp.</p>

<p>By the time I get out of work, the sun has already gone down and while it&#8217;s not too cold out, it would be nice to be able to get in a run at the end of the day.&nbsp; I have a reflective vest that works really well but last year I found that although drivers could see me, I couldn&#8217;t really see the road on which I was running.&nbsp; I don&#8217;t want to take a chance of twisting an ankle or taking a bad fall, so I&#8217;m hoping the headlamp will do the trick.</p>

<p>I suspect I&#8217;ll have a bit of a problem getting used to it at first.&nbsp; I&#8217;ve never liked wearing hats and I&#8217;m not sure that wearing a headband with a lamp attached to it will be any better.&nbsp; I&#8217;ll just have to adjust.</p>
	  ]]></content>
	</entry>

	<entry>
	  <title>Adding Debug and Release References to Visual Studio Projects</title>
	  <link rel="alternate" type="text/html" href="http://www.carnali.com/index.php/adding_debug_and_release_references_to_visual_studio_projects" />
	  <id>tag:carnali.com,2011:index.php/1.43</id>
	  <published>2011-11-12T16:40:42Z</published>
	  <updated>2011-11-12T13:40:43Z</updated>
	  <author>
			<name>Al</name>
			<email>al@carnali.com</email>
				  </author>

	  <category term="C#"
		scheme="http://www.carnali.com/index.php/news/C17"
		label="C#" />
	  <content type="html"><![CDATA[
		<p><img class="leftimg" src="/images/site_images/posts_images/visual_studio.jpg" alt="visual studio image"><br />
A minor annoyance with Visual Studio, is that it doesn&#8217;t allow you to include conditional references to Debug and Release versions of class libraries.&nbsp; For example, if you have a project and you add a reference to a class library by right-clicking on the &#8216;Reference&#8217; folder and selecting the &#8216;Add Reference&#8230;&#8217; menu item, the version of the library that you choose, be it Debug or Release, will always be used regardless of whether you choose to build a Debug or Release version of your project.</p>

<p>There is a way around this.&nbsp; First, add your reference to the class library using Visual Studio as you normally would.&nbsp; Next, close your project and open your project file (*.csproj) using the source code editor.&nbsp; Find the location of the reference you just added and replace the &#8216;Debug&#8217; or &#8216;Release&#8217; portion of the string with &#8216;$(Configuration)&#8217;.</p>

<p>Code after the break&#8230;<br />
<span id='wlp_break'></span></p>

<p>Here&#8217;s and example from a project that I modified:</p>

<u>Original Project File Code</u>
<div style="font-family: Consolas; font-size: 10pt; color: black; background: white;">
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp;&nbsp;&nbsp;1</span>&nbsp;<span style="color: blue;">&lt;</span><span style="color: #a31515;">Reference</span><span style="color: blue;"> </span><span style="color: red;">Include</span><span style="color: blue;">=</span>&quot;<span style="color: blue;">Carnali.PropertySetter</span>&quot;<span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp;&nbsp;&nbsp;2</span>&nbsp;<span style="color: blue;">&nbsp; &lt;</span><span style="color: #a31515;">HintPath</span><span style="color: blue;">&gt;</span>..\PropertySetter\PropertySetter\bin\Release\Carnali.PropertySetter.dll<span style="color: blue;">&lt;/</span><span style="color: #a31515;">HintPath</span><span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp;&nbsp;&nbsp;3</span>&nbsp;<span style="color: blue;">&lt;/</span><span style="color: #a31515;">Reference</span><span style="color: blue;">&gt;</span></p>
</div>

<p>&nbsp;</p><u>Modified Project File Code</u>
<div style="font-family: Consolas; font-size: 10pt; color: black; background: white;">
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp;&nbsp;&nbsp;1</span>&nbsp;<span style="color: blue;">&lt;</span><span style="color: #a31515;">Reference</span><span style="color: blue;"> </span><span style="color: red;">Include</span><span style="color: blue;">=</span>&quot;<span style="color: blue;">Carnali.PropertySetter</span>&quot;<span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp;&nbsp;&nbsp;2</span>&nbsp;<span style="color: blue;">&nbsp; &lt;</span><span style="color: #a31515;">HintPath</span><span style="color: blue;">&gt;</span>..\PropertySetter\PropertySetter\bin\$(Configuration)\Carnali.PropertySetter.dll<span style="color: blue;">&lt;/</span><span style="color: #a31515;">HintPath</span><span style="color: blue;">&gt;</span></p>
<p style="margin: 0px;"><span style="color: #2b91af;">&nbsp;&nbsp;&nbsp;&nbsp;3</span>&nbsp;<span style="color: blue;">&lt;/</span><span style="color: #a31515;">Reference</span><span style="color: blue;">&gt;</span></p>
</div>

<p>&nbsp;</p>
	  ]]></content>
	</entry>

	<entry>
	  <title>Old People</title>
	  <link rel="alternate" type="text/html" href="http://www.carnali.com/index.php/old_people" />
	  <id>tag:carnali.com,2011:index.php/1.42</id>
	  <published>2011-11-08T13:11:53Z</published>
	  <updated>2011-11-12T13:51:54Z</updated>
	  <author>
			<name>Al</name>
			<email>al@carnali.com</email>
				  </author>

	  <category term="Unclassified"
		scheme="http://www.carnali.com/index.php/news/C16"
		label="Unclassified" />
	  <content type="html"><![CDATA[
		<p><img class="leftimg" src="/images/site_images/posts_images/abe_simpson.jpg" alt="abe simpson image"><br />
I like old people.&nbsp; I really do.&nbsp; In fact, I hope to be one of them some day.&nbsp; I just wish they had some consideration for those of us that work for a living.&nbsp; For example,&nbsp; I&#8217;m at a medical lab this morning needing to get a blood test, and the waiting area is filled with old people who I suspect have little else on their schedule today.&nbsp; It sure would be nice if they waited until the morning rush was over before coming in for their tests.&nbsp; It would really make life easier for the rest of us.</p>



<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>
	  ]]></content>
	</entry>

	<entry>
	  <title>Garmin Forerunner 610 Update</title>
	  <link rel="alternate" type="text/html" href="http://www.carnali.com/index.php/garmin_forerunner_610_update" />
	  <id>tag:carnali.com,2011:index.php/1.41</id>
	  <published>2011-11-06T15:27:35Z</published>
	  <updated>2011-11-06T07:29:36Z</updated>
	  <author>
			<name>Al</name>
			<email>al@carnali.com</email>
				  </author>

	  <category term="Other"
		scheme="http://www.carnali.com/index.php/news/C12"
		label="Other" />
	  <content type="html"><![CDATA[
		<p><img class="leftimg" src="/images/site_images/reviews/garmin610.jpg" alt="garmin 610 image"></p>

<p>Here&#8217;s my update for the last post about the Garmin 610&#8230;</p>

<p>Since the last review, I spoke with a women at Garmin support (based in the USA!) and she was very helpful. She agreed the GPS had a problem, and was willing to replace it, but they did not currently have any in stock. She suggested that I talk to the retailer to see if they could do an immediate replacement. I then contacted Clever Training, the Amazon merchant, by email and they said they would send me a replacement upon receiving the defective item. I packaged it up, sent it off and in about a week received the new 610. </p>

<p>I initially had problems setting up the new 610. The software required a firmware update, but the Garmin Ant agent software wouldn&#8217;t recognize it. I believe this was because I had previously activated the other 610 on the computer. I tried deleting the old profile, re-installing the software, etc but no-go. I finally gave up and had to use another computer to do the firmware update. There is obviously a bug in the Garmin software which they hopefully will fix in a future release. </p>

<p>For the most part the watch works well. There have been a few minor glitches. I once saw the display reset and start counting from zero after I had completed a mile, but scrolling through the screens seemed to fix it. The actual data appeared to have no problems so this just appears to be a display issue. </p>

<p>On slightly more annoying problem is that the Ant received won&#8217;t recognize the watch has data to upload, until I pull out the dongle and reinsert it. A minor problem, but somewhat annoying. Again, I hope this gets fixed in a future software release. </p>

<p>The GPS is definitely a step up from the 305 but for a lot of people I&#8217;m not sure it will be worth the 3x price premium. The 305 always felt like a prototype to me whereas the 610 feels like the finished product. Most of the new features are nice to have but are not really required. I won&#8217;t go into all the features here, but read the review at the DCRainmaker site if you want to learn more about it. </p>

<p>I&#8217;m updating my rating to 4 stars now, but might go to 5 once the software glitches have been fixed.</p>
	  ]]></content>
	</entry>

	<entry>
	  <title>Garmin Forerunner 610 Problem</title>
	  <link rel="alternate" type="text/html" href="http://www.carnali.com/index.php/garmin_forerunner_610_problem" />
	  <id>tag:carnali.com,2011:index.php/1.40</id>
	  <published>2011-07-10T10:54:01Z</published>
	  <updated>2011-07-10T03:57:02Z</updated>
	  <author>
			<name>Al</name>
			<email>al@carnali.com</email>
				  </author>

	  <category term="Other"
		scheme="http://www.carnali.com/index.php/news/C12"
		label="Other" />
	  <content type="html"><![CDATA[
		<p><img class="leftimg" src="/images/site_images/reviews/garmin610.jpg" alt="garmin 610 image"></p>

<p>This is a copy of a review I just posted on Amazon for the Garmin Forerunner 610 GPS Watch.</p>

<p>&#8212;&#8212;&#8212;&#8212;-</p>

<p>I purchased this GPS watch about a week ago.&nbsp; When I first received it, I put it in the charging cradle and charged it to 100%.&nbsp; Everything was fine.&nbsp; I ran with it a few days, then upgraded the firmware to the new 2.4 release.&nbsp; The next time I attempted to charge the unit, instead of charging, it began to discharge with the percent charge number going down until the unit was fully discharged.</p>

<p>I checked the Garmin forums to see if there was a fix for this and found that there are a whole bunch of people dealing with this issue.&nbsp; A Garmin rep posted in late June that they were aware of the problem and were looking into it, but there have been no additional postings about it since then.</p>

<p>I attempted a few other things on my own to try to fix this.&nbsp; I did a hard reset.&nbsp; No go.&nbsp; I also attempted to charge the unit through the computers USB port.&nbsp; Again no go.</p>

<p>I&#8217;ve contacted Garmin support this morning (Sunday) and hope that I will get a response tomorrow.</p>

<p>If you&#8217;re considering purchasing one of these, I suggest you check the Garmin forums first to see if this issue has been resolved, otherwise you&#8217;re taking you&#8217;re chances.</p>

<p>I&#8217;ll write an update to this when I have more information.&nbsp; The GPS watch itself is pretty nice with lots of features and if it wasn&#8217;t for this problem probably would have gotten a really good review.&nbsp; I previously owned a Forerunner 305 for many years and was always happy with it and I hope I&#8217;ll soon be able to say the same thing about the 610.</p>
	  ]]></content>
	</entry>

	<entry>
	  <title>Left Wing Media Bias</title>
	  <link rel="alternate" type="text/html" href="http://www.carnali.com/index.php/left_wing_media_bias" />
	  <id>tag:carnali.com,2011:index.php/1.39</id>
	  <published>2011-06-18T09:53:20Z</published>
	  <updated>2011-06-18T03:13:21Z</updated>
	  <author>
			<name>Al</name>
			<email>al@carnali.com</email>
				  </author>

	  <category term="National"
		scheme="http://www.carnali.com/index.php/news/C3"
		label="National" />
	  <content type="html"><![CDATA[
		<p>The so called &#8220;paper of record&#8221; once again showed how biased their reporting is.&nbsp; Here&#8217;s the title of an article published in the June 17, 2011 edition of the New York Times - &#8220;2 Top Lawyers Lost to Obama in Libya War Policy Debate.&#8221;&nbsp; The title would lead you to believe that Obama is just so damn smart that the two top lawyers couldn&#8217;t successfully compete against him in a contest of intelligence.&nbsp; If the New York Times was in the least bit ethical, the title of the story would have been - Obama Ignored the Views of 2 Top Lawyers in the Libya War Policy Debate.&#8221;</p>


	  ]]></content>
	</entry>

	<entry>
	  <title>WPF Dependency Properties</title>
	  <link rel="alternate" type="text/html" href="http://www.carnali.com/index.php/wpf_dependency_properties" />
	  <id>tag:carnali.com,2011:index.php/1.38</id>
	  <published>2011-04-17T19:50:04Z</published>
	  <updated>2011-04-17T13:10:05Z</updated>
	  <author>
			<name>Al</name>
			<email>al@carnali.com</email>
				  </author>

	  <category term="C#"
		scheme="http://www.carnali.com/index.php/news/C17"
		label="C#" />
	  <content type="html"><![CDATA[
		<p>Traditionally, a property in .NET is a member variable with associated get and set methods that are used to read and write its value.</p>

</nbsp>
<p><b></p><u>Ex.Traditional .NET Property</u><p></b></p>

<div style="font-family: Consolas; font-size: 10pt; color: black; background: white;">
<p style="margin: 0px;"><span style="color: blue;">private</span> <span style="color: blue;">int</span> mEmployeeRating;</p>
<p style="margin: 0px;">&nbsp;</p>
<p style="margin: 0px;"><span style="color: blue;">public</span> <span style="color: blue;">int</span> EmployeeRating</p>
<p style="margin: 0px;">{</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; <span style="color: blue;">get</span> { <span style="color: blue;">return</span> mEmployeeRating; }</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; <span style="color: blue;">set</span> { mEmployeeRating = <span style="color: blue;">value</span>; }</p>
<p style="margin: 0px;">}</p>
</div>

<p>WPF introduces the concept of a  dependency property, which also uses get and set methods to read and write its value, but instead of storing the property value in a member variable, instead stores its value in a dictionary maintained by the property system in WPF.&nbsp; In other words the back store for a traditional property is a member variable and the back store for a dependency property is a dictionary maintained by the property system.&nbsp; This gives the property system the ability to manipulate the value returned by the property.</p>

<p>So why would you want to use a dependency property?</p>

<p>Dependency properties give you additional functionality that traditional properties do not supply.&nbsp; Dependency properties allow you to:</p>

<ul>
<li>Set the property value using resources.</li>

<li>Bind the property to a data source, so that property value gets update dynamically whenever the data source value changes.</li>

<li>Set the property value using styles.</li>

<li>Set the property value dynamically when an animation is running.</li>

<li>Set the property value by overriding its metadata.</li>

<li>Set the property value by inheriting its value from a parent in the object tree.</li>

<li>Dependency properties also are natively supported by the WPF Designer in Visual Studio.</li>

<li>Attach callbacks that can be used to notify you and a dependency property value has changed or is about to be changed.</li>
</ul>

<p>As you can see, the majority of functionality available with dependency properties are most useful for creating dynamic user interfaces, which is not surprising given they are part of WPF.</p>

<p>To support dependency properties, the object containing your property needs to derive from a DependencyObject.&nbsp; This will hook your object into the WPF property system.</p>

<p>Next, add a static DependencyProperty member to your object and call the DependencyProperty.Register() method to register your new property.</p>

<p>Finally, add get and set accessors to your object to allow the outside world access to your property.</p>

<p>&nbsp;</p>
</nbsp>
<p><b></p><u>Ex. Creating a Dependency Property</u><p></b></p>

<div style="font-family: Consolas; font-size: 10pt; color: black; background: white;">
<p style="margin: 0px;"><span style="color: blue;">public</span> <span style="color: blue;">int</span> EmployeeRating</p>
<p style="margin: 0px;">{</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; <span style="color: blue;">get</span> { <span style="color: blue;">return</span> (<span style="color: blue;">int</span>)GetValue(EmployeeRatingProperty); }</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; <span style="color: blue;">set</span> { SetValue(EmployeeRatingProperty, <span style="color: blue;">value</span>); }</p>
<p style="margin: 0px;">}</p>
<p style="margin: 0px;">&nbsp;</p>
<p style="margin: 0px;"><span style="color: blue;">public</span> <span style="color: blue;">static</span> <span style="color: blue;">readonly</span> <span style="color: #2b91af;">DependencyProperty</span> EmployeeRatingProperty =</p>
<p style="margin: 0px;">&nbsp;&nbsp; <span style="color: #2b91af;">DependencyProperty</span>.Register(<span style="color: #a31515;">&quot;EmployeeRating&quot;</span>, <span style="color: blue;">typeof</span>(<span style="color: blue;">int</span>), <span style="color: blue;">typeof</span>(<span style="color: #2b91af;">Employee</span>),</p>
<p style="margin: 0px;">&nbsp;&nbsp; <span style="color: blue;">new</span> <span style="color: #2b91af;">UIPropertyMetadata</span>(0));</p>
</div>

<p>If you are using Visual Studio, you can add your dependency property using Snippets, by selecting &#8220;Edit / Intellisense / Insert Snippet&#8230;&#8221;, and then selecting &#8220;NetFX30 / Define a DependencyProperty&#8221;</p>

<p>One thing to note;&nbsp; you should never add any additional code to your get and set methods because the end user can access the property value using either the get and set methods or the intrinsic GetValue and SetValue methods and you want the behavior to stay the same no matter which mechanism is used.</p>

<p>In the example above, you should note that one of the parameters passed in during the registration of your property allows you to pass in a Metadata object.&nbsp; You can use this metadata to set a default value for your property and to register callbacks that will notify you when a change is about to or has occurred on your property.&nbsp; The callbacks available are as follows:</p>

<ul>
<li><b>Value Changed Callback</b> - this is called whenever the value of your property has been changed.</li>

<li><b>Coerce Value Callback</b> - this gets called whenever your property is about to be changed and allows you modify the change value if you find it unacceptable.&nbsp; This could be used to set minimum and maximum allowable values for your property.</li>

<li><b>Validation Callback</b> - allows you to check the to see if the newly assigned value is valid.&nbsp; If it is, return true, if not return false and an ArgumentExeception will be thrown.</li>

</ul>

<p>&nbsp;</p>
</nbsp>
<p><b></p><u>Ex. Creating a Dependency Property with Metadata</u><p></b></p>

<div style="font-family: Consolas; font-size: 10pt; color: black; background: white;">
<p style="margin: 0px;"><span style="color: blue;">using</span> System;</p>
<p style="margin: 0px;"><span style="color: blue;">using</span> System.Collections.Generic;</p>
<p style="margin: 0px;"><span style="color: blue;">using</span> System.Linq;</p>
<p style="margin: 0px;"><span style="color: blue;">using</span> System.Text;</p>
<p style="margin: 0px;"><span style="color: blue;">using</span> System.Windows;</p>
<p style="margin: 0px;">&nbsp;</p>
<p style="margin: 0px;"><span style="color: blue;">namespace</span> DepPropEx</p>
<p style="margin: 0px;">{</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; <span style="color: blue;">class</span> <span style="color: #2b91af;">Employee</span> : <span style="color: #2b91af;">DependencyObject</span></p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; {</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: blue;">const</span> <span style="color: blue;">int</span> MAX_RATING = 10;</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: blue;">const</span> <span style="color: blue;">int</span> MIN_RATING = 0;</p>
<p style="margin: 0px;">&nbsp;</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: blue;">public</span> <span style="color: blue;">int</span> EmployeeRating</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: blue;">get</span> { <span style="color: blue;">return</span> (<span style="color: blue;">int</span>)GetValue(EmployeeRatingProperty); }</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: blue;">set</span> { SetValue(EmployeeRatingProperty, <span style="color: blue;">value</span>); }</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }</p>
<p style="margin: 0px;">&nbsp;</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: blue;">public</span> <span style="color: blue;">static</span> <span style="color: blue;">readonly</span> <span style="color: #2b91af;">DependencyProperty</span> EmployeeRatingProperty =</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: #2b91af;">DependencyProperty</span>.Register(<span style="color: #a31515;">&quot;EmployeeRating&quot;</span>, <span style="color: blue;">typeof</span>(<span style="color: blue;">int</span>), <span style="color: blue;">typeof</span>(<span style="color: #2b91af;">Employee</span>),</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: blue;">new</span> <span style="color: #2b91af;">PropertyMetadata</span>(MIN_RATING, EmployeeRatingChangedCallback, EmployeeRatingCoerceCallback), EmployeeRatingValidateCallback);</p>
<p style="margin: 0px;">&nbsp;</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: blue;">private</span> <span style="color: blue;">static</span> <span style="color: blue;">void</span> EmployeeRatingChangedCallback(<span style="color: #2b91af;">DependencyObject</span> obj, <span style="color: #2b91af;">DependencyPropertyChangedEventArgs</span> e)</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: #2b91af;">MessageBox</span>.Show(<span style="color: #2b91af;">String</span>.Format(<span style="color: #a31515;">&quot;The EmployeeRating changed from {0} to {1}&quot;</span>, e.OldValue, e.NewValue));</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }</p>
<p style="margin: 0px;">&nbsp;</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: green;">// Return mLastEmployeeRatingValue + 1 if the value falls outside the range of 1000 to 10000</span></p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: blue;">private</span> <span style="color: blue;">static</span> <span style="color: blue;">object</span> EmployeeRatingCoerceCallback(<span style="color: #2b91af;">DependencyObject</span> obj, <span style="color: blue;">object</span> o)</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: blue;">if</span> ((<span style="color: blue;">int</span>)o &gt; MAX_RATING)</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: blue;">return</span> MAX_RATING;</p>
<p style="margin: 0px;">&nbsp;</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: blue;">return</span> o;</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }</p>
<p style="margin: 0px;">&nbsp;</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: green;">// If the new value is the same as the old value force an exception to be thrown.</span></p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: blue;">private</span> <span style="color: blue;">static</span> <span style="color: blue;">bool</span> EmployeeRatingValidateCallback(<span style="color: blue;">object</span> value)</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: blue;">if</span> ((<span style="color: blue;">int</span>)value &lt; MIN_RATING)</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: blue;">return</span> <span style="color: blue;">false</span>;</p>
<p style="margin: 0px;">&nbsp;</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <span style="color: blue;">return</span> <span style="color: blue;">true</span>;</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }</p>
<p style="margin: 0px;">&nbsp;&nbsp;&nbsp; }</p>
<p style="margin: 0px;">}</p>
<p style="margin: 0px;">&nbsp;</p>
</div>

<p>&nbsp;</p>
	  ]]></content>
	</entry>

	<entry>
	  <title>Battle in Heaven</title>
	  <link rel="alternate" type="text/html" href="http://www.carnali.com/index.php/battle_in_heaven" />
	  <id>tag:carnali.com,2011:index.php/1.37</id>
	  <published>2011-03-27T12:22:03Z</published>
	  <updated>2011-03-27T05:56:04Z</updated>
	  <author>
			<name>Al</name>
			<email>al@carnali.com</email>
				  </author>

	  <category term="Movies"
		scheme="http://www.carnali.com/index.php/news/C10"
		label="Movies" />
	  <content type="html"><![CDATA[
		<p><img class="leftimg" src="/images/site_images/reviews/battleinheaven.jpg" alt="battle in heaven image"><br />
I&#8217;ve found that one pretty good indicator of really bad movies is when a movie gets featured at prestigious film festivals but never makes it into the main stream.&nbsp; Battle in Heaven is a classic example of this.&nbsp; The critics seem to love it but because it&#8217;s &#8220;artsy&#8221; but that&#8217;s about the only thing that it&#8217;s got going for it.</p>

<p>Since this movie is pretty bad and I expect that you&#8217;ll never see it, the rest of the review will contain spoilers, so bail now if you really thinks you want to see this film.</p>

<p>The movie centers around a Mexican man, Marcos, who along with his obese wife have kidnapped a baby.&nbsp; Unfortunately, the baby died while in their custody and Marcos is filled with guilt.&nbsp; Marcos works for the chief of police and one of his duties is chauffeuring the chiefs twenty-something daughter, Ana.&nbsp; Unbeknownst to the Chief, but known by Marcos, Ana gets her kicks buy working part time as a prostitute.&nbsp; Marcos unable to contain his guilt over the death of the baby, tells Ana what happened.</p>

<p>The rest of the movie is about Marcos brooding about the city, trying to decide if he should confess his crime, having sex with his obese wife (I considered ripping my eyes out after seeing this), having sex with Ana (made it worth not ripping out my eyes), stabbing Ana to death and eventually crawling on his knees to atone for his sin to the Basilica during a festival to honor of the Lady of Guadalupe.</p>

<p>The movie ends with Marcos standing in heaven with Ana on her knees in front of him giving him a blow job.</p>

<p>The critics loved it, but I guess I&#8217;m one of the great unwashed that was just too stupid to get it.</p>

<p>The moving was pretty bad, but Ana&#8217;s looks pretty good naked which redeems it just a bit.&nbsp; There are a few graphic sex scenes so if you find this offensive, this movie is not for you.</p>



<p><br />
My rating:&nbsp; 3 out of 10 stars.</p>
	  ]]></content>
	</entry>

	<entry>
	  <title>Edge of Darkness</title>
	  <link rel="alternate" type="text/html" href="http://www.carnali.com/index.php/edge_of_darkness" />
	  <id>tag:carnali.com,2011:index.php/1.36</id>
	  <published>2011-03-27T11:42:05Z</published>
	  <updated>2011-03-27T05:20:06Z</updated>
	  <author>
			<name>Al</name>
			<email>al@carnali.com</email>
				  </author>

	  <category term="Movies"
		scheme="http://www.carnali.com/index.php/news/C10"
		label="Movies" />
	  <content type="html"><![CDATA[
		<p><img class="leftimg" src="/images/site_images/reviews/edgeofdarkness.jpg" alt="edge of darkness image"><br />
Mel Gibson plays a single dad cop whose recently graduated daughter finds herself in some serious trouble.&nbsp; Mel spends most of the movie trying to find out what happened.</p>

<p>This is definately a second tier Mel Gibson movie.&nbsp; It&#8217;s watchable and somewhat entertaining but just doesn&#8217;t come up to the level of most of his previous movies.&nbsp; There are also a few places in the script where you get the feeling that something was cut on the editing floor because things are happening that don&#8217;t make a lot of sense.</p>



<p>&nbsp;</p>

<p>&nbsp;</p>

<p><br />
My rating: 4 out of 10 stars</p>

<p>&nbsp;</p>

<p>&nbsp;</p>
	  ]]></content>
	</entry>

	<entry>
	  <title>They left out the &#8220;It hurts like hell&#8221; part</title>
	  <link rel="alternate" type="text/html" href="http://www.carnali.com/index.php/they_left_out_the_it_hurts_like_hell_part" />
	  <id>tag:carnali.com,2011:index.php/1.35</id>
	  <published>2011-01-09T18:58:48Z</published>
	  <updated>2011-01-09T11:38:49Z</updated>
	  <author>
			<name>Al</name>
			<email>al@carnali.com</email>
				  </author>

	  <category term="Other"
		scheme="http://www.carnali.com/index.php/news/C12"
		label="Other" />
	  <content type="html"><![CDATA[
		<p><img class="leftimg" src="/images/site_images/posts_images/compoundw.jpg" alt="compoundw image"><br />
I&#8217;ve had a small wart on the top of my left hand for about a year now.&nbsp; Shortly after it appeared I tried to get rid of it using one of those over-the-counter salacylic acid wart remover products.&nbsp; Following the directions on the bottle, I applied the stuff twice a day, every day for about two weeks.&nbsp; At the end of the two weeks, nothing had changed.&nbsp; I knew I should go to a dermatolgist to get it taken care of, but it was pretty minor and I just never got around to scheduling an appointment.</p>

<p>Last night while I was at CVS with my wife, I spotted Compound W Freeze Off on one of the shelves.&nbsp; The packaging on the product, claimed to freeze off warts similar to the method used by dermatologists.&nbsp; Since I had had a wart successfully removed by a dermitologist years ago using the freeze method, I decided I&#8217;d give it a try.&nbsp; What the heck, it was only twenty bucks.&nbsp; What could go wrong?</p>

<p>This morning when I got up, I unpacked the product and read the instructions.&nbsp; Seemed simple enough.&nbsp; Stick one of the cotton swab like applicators into the holder, insert the holder into the main bottle and press down for three seconds to unlease the freezing compound.&nbsp; Take the applicator out and hold it against the wart for a period of time determined by the size of the wart, and wait for up to ten days for the wart to fall magically off.</p>

<p>I went through the whole process, and just before I got to the point where I was to apply the applicator to the wart, it dawned on me;&nbsp; before the dermitologist froze the wart he first injected something into it to numb the area.&nbsp; That step appeared to be missing from this process.</p>

<p>Oh well.&nbsp; How bad could it be?&nbsp; Anyway, I had paid twenty dollars for this and I&#8217;m too cheap to waste the money.&nbsp; So I applied the applicator.</p>

<p>Ever see one of those spy movies where the bad guy presses a lit cigarette into the flesh of the protaganist to get information out of him?&nbsp; That about sums up the wart removal process.&nbsp; The worst part is that I had to hold the damn thing on the wart for about fifteen seconds while the thing sizzled like I was frying bacon.&nbsp; Not a good time.</p>

<p>After about a half hour the pain pretty much subsided although it still hurts a bit.</p>

<p>Before I started to write this post, I did a search to see what other people experianced while using this product.&nbsp; A lot of them complained about the pain, but even worse, most of them said the wart never went away.&nbsp; Bummer.</p>

<p>I&#8217;ll update this in a couple of weeks and let you know if the wart is around.</p>


	  ]]></content>
	</entry>


</feed>
