Saturday, January 19, 2013

Restore missing Item templates in Visual Studio 2012

I’m working on a large Silverlight to WPF project migration and came across a issue where item templates where not being displayed from the Add new Items dialog. After a bit of searching it became apparent that this was a fairly common problem and there are a number of ways to fix the issue. Of the the various suggestions I found one seemed to work the best, although it was originally for Visual Studio 2010. So here is how you can get those missing templates back.

  • Navigate to C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE
  • Delete the ItemTemplatesCache folder
  • In the ItemsTemplate folder navigate to the templates you want to display and for each template open the vstemplate file in a text editor and set ShowByDefault from false to true
  • run devenv /installvstemplates

You may need to run this as an administrator. Once this is done open your project in Visual Studio and right click “Add New Item” your templates should now appear.

Monday, January 14, 2013

The Problem with Windows 8 Apps

I have to admit I was skeptical of Windows 8 when it was announced. Since it was released I’ve migrated my laptop and desktop as well as purchasing a Surface and HTC 8X windows phone. While I’ve been happy with the phone apps I’ve downloaded from the store, the Windows 8 apps are another story.

First let me set the bar, I look for apps where the developer took some time to develop an icon. If I see an app in the store with the default Visual Studio App Store app template you’ve lost me. Even if it is the greatest app since the internet the fact that you could not take a few moments to build even a basic icon tells me you really don’t care about your work. There are literally dozens of these app icons in the store.

I expect the app to be responsive. If the data is stale or not updated or the app just plain says it updated and I can go somewhere and see this in not the case you’ve lost me. A case in point are twitter apps, I can look at twitter on the web and compare what is displayed in the app and I can tell you’ve lied. Both Rowi and Metro Twit done this. Facebook apps have similar issues. If you have an app in the store that uses social networking it better update consistently.

I expect apps to provide the advertised functionality, if your app won’t even provide the advertised functionality you’ve lost me.

I have taken the stand of not paying for a single app until I can be reasonably sure that what I pay for will work. The biggest hurdle that Microsoft needs to overcome is not the number of apps in the store, but the quality. you can have a million garbage apps (ask google) but when you have quality apps that work as advertised and provide value then you only need a few to be profitable and build user loyalty.

Maybe the message to developers should change from “Build apps for the store quick and easy” to “Make quality apps and create revenue”. I’m still skeptical about the future but all it will take is quality in the store.

Monday, July 23, 2012

Some thoughts on the Metro UI in Visual Studio 2012

The Metro UI in the Visual Studio 2012 is horrible  The icons and graphics make navigating a solution nearly impossible. The Light Theme and Dark Theme are equally unreadable. The geniuses that came up with this UI concept should be tarred and feathered. Even with the improvements in search and the solution explorer I still find myself being less productive because I have to study each file to make sure that’s what I want to work with. Lets not even start on the ALL CAPS MENU, really?

I appreciate the IDE improvements but how about a choice? Dear Microsoft, Metro doesn’t work for everything. 

Monday, December 13, 2010

What a difference a release makes

It's been pretty hectic the last couple of months for me. I'm now involved in a one man enterprise project (yes they exist) and between vetting requirements, architecting and coding there really hasn't been a lot of writing time.

One of the things that is at the top my priority list for this project is to provide a high quality and consistent user experience. To that end I had planned to use the DevExpress Silverlight toolset. This looked like a good choice as they're support had been good and the control set looked to be expanding in areas that I would certainly need, such as Charting. But the DevExpress 10.2 release fell flat for me in more areas than it should of. From lack of documentation for new controls (in mean no documentation) to bugs that had not existed in DevExpress 10.1 and where now closed as "Microsoft's problem" (really it worked fine in the last release) to Themes not working with prisim modules, I decided I needed to rethink my choice.

I decided to take another look at Telerik. To be honest, I really didn't want to change, as it's always hard to say "hey maybe I was wrong", but sometimes you just have to rethink your approach. I was pleasantly surprised by the depth of the documentation and ease of use of the toolset. The Telerik controls provided a consistent data binding experience, so no longer did I have to ask "ItemsSource or DataSource or is it something more obscure?" or dig through reams of docs to find examples, it worked flawlessly with prisim and provides great support for commanding. The GridView also supports Hierarchical data, which is something that I will need. Overall I've been very impressed with the toolset and in the future will also make use of the MVC extensions as well.


 

Thursday, October 7, 2010

Silverlight and MVVM

I've been very heads down lately on a very large .Net project. The project team should be 5 or larger given the scope, but in the spirit of "do more with less", it's just me. Part of the application contains an internal facing UI, which is being done in Silverlight. In an effort to streamline the work I decided to go with the MVVM approach. While MVVM is the "end all be all" rage these days I am encountering a number of problems. First is in the application flow. I am working from screen designs rendered in photo shop by an offsite designer (he's not interested in xaml or learning). These screens tend to be busy and in my opinion very ADD. This makes it extremely difficult to isolate a clean View Model. What I've discovered is that a number of views may need to access the same data so you end up creating a Master View to coordinate the children. Also the no code model in the views is very difficult to achieve when complex interactions are required. I know that I can use Unity or any number of other MVVM frameworks to alleviate some of the issues, but add to the download overhead, which because of the inclusion of third party components is already larger than it need to be.

So while MVVM may be a panacea to some, I see a number of issues with the approach and until the model is built into the framework core it will continue to be a problem.

 

Tuesday, July 13, 2010

DXWindow and DXDialog as Silverlight a UserControl

Here is a quick example of making a DXDialog or DXWindow a user control in your Silverlight applications.

Add a reference to DevExpress.xpf.Core to you Silverlight application.

Modify the xaml so that it is a DXWindow (or DXDialog).

<dec:DXDialog x:Class="DevExpressWindow.Dialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:dec="clr-namespace:DevExpress.Xpf.Core;assembly=DevExpress.Xpf.Core.v10.1"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">    
    <Grid x:Name="LayoutRoot" Background="White">
        <TextBlock Text="Your UI here." HorizontalAlignment="Center" VerticalAlignment="Center"/>

    </Grid>
</dec:DXDialog>


 


 

And modify the code behind so that instead of deriving from UserControl, derive from DXwindow (or DXDialog) like so.

using System;
using DevExpress.Xpf.Core;


namespace DevExpressWindow
{
    public partial class Dialog : DXDialog
    {
        public Dialog()
        {
            InitializeComponent();
        }
    }
}


 

And to use it from within the application

  private void btnNewDialog_Click(object sender, RoutedEventArgs e)
  {
            Dialog dlg = new Dialog { Title = "My Dialog",Height=200 };
            dlg.ShowDialog();
  }


 

The result is a reusable dialog or window.


 


 


Wednesday, June 9, 2010

Controls follow up

I've had a chance now to use the DevExpress and Telerik control suites. Here are some observations which may be helpful to those of you in the market for controls.

Installers

DevExpress wins this hands down. They have a single installer for all products. You can select only the components your licensed for or trial those you don't own. The installer also updates existing products, so no uninstall reinstall dance.

Coding Tools

Code Rush beats Telerik Just Code. There is simply no comparison in the functionality between the two products. It's like comparing an Erector set to Lincoln logs (I may have dated myself).

Updates

Telerik seems to update like a person with ADHD. Every product has an update at a different time. This is a pain in the backside. Additionally, the highly touted visual studio extensions require you to run Visual Studio 2010 as an Admin to update, and then they fail with a "Program must be removed from Add/Remove Programs", major fail Telerik. DevExpress as mentioned earlier provides a unified update process which is easier to manage.

Controls

In this area both vendors are pretty evenly matched in functionality. I've found the DevExpress components to be more "Developer Friendly" in that they work as advertised and don't require any fiddling to get the components to work. As an example I created web applications with grids that rendered a set of image records that were retrieved as binary images from a simple database. The DevExpress Binary Image Column rendered right out of the box, I could never get the Telerik Binary Image column to display anything other than an "X". If it's documented somewhere I sure wasn't able to find it.

Support

I have had to use the DevExpress support and they are an outstanding group who addressed my issue in a timely and efficient manner. I cannot comment on the Telerik support as I haven't opened any issues with them at this time. The DevExpress issue was a help installation issue on Windows 2008, which was addressed and resolved in less than 48 hours. Pretty impressive in my opinion.