Installing SQL Server R2 Management Studio on machine with VS2008 without SP1

Sunday, March 25, 2012

I’ve been trying to install SQL Server R2 Management Studio on my customer site DEV machine I’m working with, and suddenly the I’ve got an annoying message saying that I don’t have VS2008 SP1 installed and the installation failed. Mainly I’m working with  VS2010 only, and I really don’t care about VS2008, especially not in concern with Management Studio… Now I have three options: 1. Uninstall Visual Studio 2008 2. Download and install VS 2008 SP1, which takes decades… 3. Fool installation app to think VS is not installed   Since I really don’t have time to waste, I’ve...
one comment

Animating ViewModel Properties instead of View Bound Properties

Monday, January 24, 2011

Trying to animate a View property which is bound two-way to a View Model property, yields working animation but also unchanged View Model. It turns out that animating a two-way data-bound property breaks the data-binding! For example, having a line bounds to its view-model, X1, Y1, X2, Y2 properties, if you'll try to animate the Line, the line will be animated but at the same time its X1, Y1, X2, Y2 properties will left unbound. So how to fix that? Instead of animating the view, animate the view-model. Anyhow, it's much easier to reflect view-model...
no comments

Customizing Windows 7 Taskbar from WPF – Part 3 (Jumplist Markups)

Monday, November 22, 2010

In my previous posts I’ve demonstrated how to customize the Windows 7 Taskbar Jumplist with custom icons and actions. In this post I would like to show how to leverage XAML Markup Extensions to pick the right assembly name for both the application full path and icon resource full path. One real bizarre thing in the WPF Jumplist is that there is no option to initialize some Jumplist properties after created from XAML. For example: The JumplistTask application path. The only option is to create the whole Jumplist from code behind (Horrible…). So I had an idea...
no comments

Customizing Windows 7 Taskbar from WPF – Part 2 (Jumplist Custom Actions)

Sunday, November 21, 2010

In my previous post I showed how to use a native resource in a .NET application and how to pick a custom icon for Jumplist Tasks. In this post I would like to show how to activate custom actions from the Windows 7 Jumplist, exactly like Window Media Player and other applications do. Programs designed for Windows 7 can take advantage of the taskbar features for quickly activating application’s common actions even though the application is minimized. Actions could be added to both thumbnail toolbars and Jumplist. Before adding actions to the Jumplist you should ask yourself few questions: Do users often need to...
no comments

Customizing Windows 7 Taskbar from WPF – Part 1 (Jumplist Custom Icon)

Friday, November 19, 2010

Windows 7 Taskbar Jumplist takes you right to your favorite applications or frequent files related to your application running in the task bar. To open a Jump List, just right-click a program icon on the Windows 7 taskbar and the Jumplist pops up. If you look in MSDN for the WPF 4 JumpList class you’ll see a very nice code snippet which creates Jumplist tasks but uses an external DLL as the source of the tasks icons. First you should know that the WPF 4 JumpList is only a managed wrapper around the Windows 7 Jumplist Native APIs, and the only option...
no comments

Running on Windows Phone 7 Emulator or real Device

Wednesday, November 17, 2010

In one of the labs I’m writing for the Windows Phone Training Kit I’m using kind of GPS Emulator for simulating a geographic location (Latitude, Longitude). This simulator comes in handy when writing location aware application, and you don’t really have a GPS on the emulator. So instead of using C# pragmas for picking the correct path, knowing whether the application is running on a real device or not, there is an easy static property for checking that: if (Microsoft.Devices.Environment.DeviceType == Microsoft.Devices.DeviceType.Emulator){    MessageBox.Show("Running on Emulator");}else{    MessageBox.Show("Running on Device");} Opening Microsoft.Phone.dll using reflector is seams like the: Microsoft.Devices.Environment.DeviceType...

Saving and Loading Captured Image To and From WP7 Isolated Storage

Tuesday, October 12, 2010

If you read my previous post about WP7, explaining how to use launchers and choosers, you may wonder how to capture an image using the phone camera, then saving it to the phone’s isolated storage. While it is easy to capture an image, it’s trickier to save it to the isolated storage. To capture an image you should do this:public partial class MainPage : PhoneApplicationPage { private byte _imageBytes; private void buttonCapture_Click(object sender, RoutedEventArgs e) { ShowCameraCaptureTask(); } private void...

How to bind ToolBar items

Thursday, July 22, 2010

You have created a view-model for your ToolBar control, and you have a collection of commands exposed by the view-model as a property (Commands). Now you want to bind your ToolBar.ItemsSource with that property, so you have something like this: <ToolBar ItemsSource="{Binding Commands}" Height="64" />   Of course, you want to have each command as a button, so you’ve created a DataTemplate: <DataTemplate DataType="{x:Type local:CommandModel}"> <Button Command="{Binding Command}"> <StackPanel> <Image Source="{Binding Icon}" Width="32" Height="32" /> ...

<howto> Start Animation on Model property changed </howto>

Friday, November 6, 2009

Lately I’m teaching UI designers to work with WPF, and one of my students asked me how to start an animation when model’s property changes, and this was my answer: If the animated element is part of a DataTemplate, use DataTrigger to monitor data changes and to start the animation. But if you don’t have a DataTemplate or the animated element is not part of the DataTemplate, create a Style for that element, and use a simple DataTrigger within. <Style x:Key="PathStyle" TargetType="{x:Type Path}"> <Style.Resources> ...
no comments

<howto>Know that you’re in design time mode</howto>

Tuesday, September 1, 2009

When you write markup extensions, or any other control that may work differently at runtime then design time, you may want to check if you’re in design time to pick the correct logic. In WPF, you can call the DesignerProperties.GetIsInDesignMode attached property. In Silverlight, you may use the HtmlPage.IsEnabled property. This will work from both Blend and Cider designers. Example: if (DesignerProperties.GetIsInDesignMode(textBox) {    return "In Design Time Mode"; }   return runtimeValue; If you don’t have the dependency object in your hand, you can pass an empty...
one comment