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

Exit Windows Phone Application

Saturday, January 14, 2012

Many Windows Phone developers wonders how a Windows Phone Silverlight application can be closed? The problem is that Microsoft didn’t provide any official way closing a Silverlight application, since working with the Metro style UX concept, the user should press the Back key, closing the application by himself. You can argue with me about this concept, but this is not the place for discussing it. You may read further about it here. This post is going to provide a simple and correct way of asking the user to close the application, leaving him no other option. But first, you...

Open Links inside the WebBrowser control or outside using IE

Sunday, August 14, 2011

Windows Phone WebBrowser control is a great option for those applications that should host HTML content. Using the WebBrowser control is so simple, you just have to instantiate one and start using it by just calling the Navigate method: Code Snippet             <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">     <phone:WebBrowser Name="webBrowser" /> </Grid>   Code Snippet webBrowser.Navigate(new Uri("blogs.microsoft.co.il/blogs/tomershamam")); Clicking on links inside the WebBrowser control, navigate to pages inside the WebBrowser control, without closing the application and opening IE. Sometimes it is preferable opening some links...
3 comments

Open Window, Dialog or Message Box from a ViewModel – part 2

Friday, April 1, 2011

In my previous post I have shown how to open a Window bound to a view-model triggered by the view, using a simple Action. In this post I'll show how to open a Window, triggered by the view-model.   Opening a window directly by the view where the view decides when a Window should be opened, is an incorrect approach since the view shouldn't make that decision. This decision belongs to the Application layer and not the Presentation layer. What if the view shouldn't be opened because of application state, user permissions or any other application...
one comment

Open Window, Dialog or Message Box from a ViewModel – part 1

Friday, March 25, 2011

Saying that a view-model belongs to the Application layer, and the Application layer doesn't references upper layers, and must not create or use visual objects, how can I open a Window, Dialog or any kind of Message Box on-the-fly, based on some logic triggered by the view or view-model? Well, there are several options doing that, one is using kind of service which encapsulates that, providing an interface, so the view-model don't really work directly with the upper layer or WPF. This solution is somehow problematic since the service should be implemented in the Presentation layer and...
2 comments

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...