Browse by Tags
All Tags »
C# »
WPF (
RSS)
Today (24.05.2011) I’ve delivered two sessions about “ Using Windows 7 Features in .NET applications ” in Sela Haifa Open House which was presented in Philips building in Haifa. Dear Philips (and other) developers, I had a great time presenting today's Windows 7 sessions. Thank you for coming! In the sessions I talked about how to use new Windows 7 features like the new Taskbar, sensors API, the Ribbon control supplied with Windows 7, Application restart and Recovery and plenty of Multi...
Yesterday (18.05.2011) I’ve delivered two sessions about “ Using Windows 7 Features in .NET applications ” in the Israeli .NET User Group, at Microsoft offices in Ra’anana. I want to thank all the attendees who came to hear the sessions, I truly enjoyed it. In the sessions I talked about how to use new Windows 7 features like the new Taskbar, sensors API, the Ribbon control supplied with Windows 7, Application restart and Recovery and plenty of Multi-Touch. We’ve seen numerous examples in C++ Win32...
In case you missed one of my previous Windows 7 sessions, here is your chance to catch it. On May 24th I’ll be giving two sessions about “ Using Windows 7 Features in .NET Applications ”, as part of Sela Haifa Open House . On the first session “ The 7 Show: From XP to Win 7 ” we will talk about new features in Windows 7 that will modernize your application. We will learn how to work with the new Taskbar, how to work with Sensors, how to use the Ribbon interface and more. The session will be rich...
On May 18th I’ll be giving two sessions about “ Using Windows 7 Features in .NET Applications ”, as part of the monthly .NET User Group sessions, in Microsoft offices, Ra’anana, Israel. On the first session “ The 7 Show: From XP to Win 7 ” we will talk about new features in Windows 7 that will modernize your application. We will learn how to work with the new Taskbar, how to work with Sensors, how to use the Ribbon interface and more. The session will be rich with examples in .NET, WPF and WinForms...
Last Thursday (07.04.2011) I’ve delivered an MSDN session about “ Using Windows 7 Features in .NET applications ” at Microsoft Ra’anana. I want to thank all the attendees who came to hear the session, I truly enjoyed it. In the session I talked about how to use new Windows 7 features like the new Taskbar, sensors API, the Ribbon control supplied with Windows 7, Application restart and Recovery and plenty of Multi-Touch. We’ve seen numerous examples in C++ Win32, C# WinForms, C# WPF and C# Silverlight...
Back in this post I’ve presented some code that make sure you only have one instance of your application. As I’ve said before, I didn’t wrote this code, I just presented it since I came across it in a Microsoft reference application and didn’t want this gem to remain hidden. Microsoft recently released a Windows 7 Recipe named “ Windows 7 Taskbar Single Instance ”, which despite its taskbar-related name is simply a revised implementation of the single instance feature in both .NET and C++. There...
Next Thursday, 07.04.2011, I’ll be giving two sessions about “ Using Windows 7 Features in .NET Applications ”, in Microsoft offices, Ra’anana, Israel. On the first session “ The 7 Show: From XP to Win 7 ” we will talk about new features in Windows 7 that will modernize your application. We will learn how to work with the new Taskbar, how to work with Sensors, how to use the Ribbon interface and more. The session will be rich with examples in .NET, WPF and WinForms. On the second session “ Touch...
The Problem How many times have you seen the following code snippets? 1. Checking method parameters if (executeMethod == null ) { throw new ArgumentNullException ( "executeMethod" ); } 2. Implementing a property in a WPF / SL view-model public double Size { get { return _size; } set { _size = value ; RaisePropertyChanged( "Size" ); } } The first time I had to wrote code like this I felt uneasy. Hardcoded strings are bad practice and should be rarely used. Even worse, using a hardcoded...
Back in this post I showed you how you can have a look at the original source code of .NET, including original comments and variable names. In this post we’ll see a few interesting things about WPF’s Dispatcher class. But first some background on the subject. WPF Thread Affinity Almost every WPF element has thread affinity. This means that access to such an element should be made only from the thread that created the element. In order to do so, every element that requires thread affinity is derived...
The Problem The question this post solves is how to enforce that your WPF application has only one instance? Solution Source The solution is based on code found in some WPF reference applications which Microsoft will soon (?) release. I didn’t wrote it, but I used it several times and it’s the best solution I’ve found to date, so I'd hate to see it unpublished. Solution Advantages So, what are the advantages of this solution? after all, it’s not the first time someone posts a solution for this...
Back in this post I showed you how you can easily add a fade-in / fade-out effect to a UIElement that changes its Visibility property, using a simple attached property. Some people encountered a problem using this property when they bind the UIElement to a model which initially hides the control. Since the default value of the Visibility property is Visible, using the attached property created an unwanted fade-out animation when the application started. To fix this issue I added another attached...
In this post I’ll show you an easy way to add fade-in / fade-out effects to your user controls, when you change their Visibility property. Adding the animation is done with an attached property, so using the code will be extremely simple. Usage Sample XAML: < Window x : Class ="WpfDemoVisibilityAnimation.Window1" xmlns ="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns : x ="http://schemas.microsoft.com/winfx/2006/xaml" xmlns : common ="clr-namespace...
The following tip is not new; it is based on this post and its comments. However, for the sake of completeness and for future reference I bring here the final version. The question this posts tries to address is: Where to put value converters? Normal Solution Usually, the common place to put value converters is in the resources section. With this in place you can use the value converter with StaticResource syntax: < UserControl.Resources > < local : NotConverter x : Key ="notConverter"...