In my efforts to experiment with WPF, I decided to try the always popular WPF sample of an irregular or custom shaped window. I had set out the following goals for this sample:
Create an oval shaped window with no standard Windows chrome Create a context menu that supports minimizing and closing the window Support dragging the window when the left mouse button is pressed Step 1 - Create an oval shaped window with no standard Windows chrome Searched the web yields a significant amount of results on how to do this, so I am only going to summarize the solution.
For the past few years Microsoft has been pushing WPF as the future user interface framework for .NET. During that time I have seen numerous demos and presentations showing amazing user interfaces. They would describe the new model of separating the designer from the developer, and how successful they were. I would usually ask two questions as a response. First, how many designers and developers were involved. Second, how close to the original time and resource estimate was the actual effort.
One of the longest running institutions in the United States is the Post Office. In fact, the very concept of mail seems to go back a couple of thousand years (see Mail). The system is very simple. You just follow the following steps:
Place the letter to be delivered into an envelope Record the destination, and optionally the source on said envelope Pay the postage fee which could be a stamp to be affixed to same envelope Place the envelope containing the letter, addressed to its destination, and paid for, in to the postal system Go do something else It is so simple that children around the world do it all the time.
Edit: Source code posted to [Hazware Unity Extensions on GitHub]
My personal inversion of control container is Unity. However, I occasionally find myself looking for functionality from the other .NET IoC containers I have used, such as Ninject and Castle Windsor. Here is the code that came out from trying to solve this need.
I was working on some Unit of Work code for NHibernate and I found the need to query the container to check if a type was registered.
I always have a tough time remembering the proper syntax for the XAML data binding. Maybe I am getting old, or I just can’t deal with yet another syntax to remember, or worse – I have become too dependant on IntelliSense. No matter what the cause, I was really grateful that Nbd-Tech put together a useful cheat sheet for the WPF Data Binding.
Here is a small snippet of the three page document.
Yesterday Bill Gates announced his intention to leave all of his day to day activities at Microsoft within two years. The media heralded the news as the end of an era. The changing of the guard metaphor was used in numerous articles. The stock market reacted by pushing Microsoft stock up a grand total of $0.03. That’s three cents as in pennies. This left the media with no story. There was no reaction.
For years we have scoured the deserts of Iraq for WMD’s to no avail. Then from out of nowhere a WMD is unleashed on American soil. Since 9⁄11 the government has told us that they had a plan. If we just trust in them and let them spend money to fund this plan, they would keep the WMD’s off our shores. They also said that a WMD being loosed on a major American city was inevitable, so they created the Department of Homeland Security with the mandate of preventing the WMD in the first place and minimizing the damage when it finally happened.
Recently, one of the developers that work for me got highly animated while pointing out an issue with the C++ code of another developer on the team. Without all the emotional buildup, it can be summarized as a class is allocated using new with a reference to a containing class passed into the constructor. The constructor adds itself (this) to the collection class and exits. The containers destructor contains all the logic to actually delete the elements it contains.