Windows Forms Listview Control Columns Header not Shown

When you use Windows Form Listview control, you will see a strange problem: you added columns, but the columns can not showing up in the designer panel in Visual Studio.

This is from Microsoft design: they set default Listview control view property to LargeIcon, maybe they think ListView control is not like regular DataGridView control, the view should be use Icon showing style?

Continue reading

Microsoft Official Dev Center Site

Here is the Dev Center site of Microsoft. You can find dev information about Desktop, Hardware, Web etc.

This is about desktop dev. You can see an info about how to choose your tech,  We can see for example the different between WPF and Windows Form:

.NET Windows Presentation Foundation (WPF): This is the preferred technology for Windows-based desktop applications that require UI complexity, styles customization, and graphics-intensive scenarios for the desktop. WPF also takes advantage of XAML views. You can leverage the new simplified asynchronous capabilities (async/await) in .NET 4.5. WPF development skills are similar to Windows Store development skills, so migration from WPF to Windows Store apps is easier than migration from Windows Forms.

.NET Windows Forms: .This was the first UI technology in the .NET Framework for building desktop applications. It is still a good fit for many business desktop applications. Windows Forms is easier to use and lighter weight than WPF for simple scenarios. Windows Forms does not use XAML, so deciding later to extend your application to Windows Phone or Windows Store entails a complete re-write of your UI.

For business application technology guide, you can download from here.

WPF and Windows Form Integration Application Localization

We have a Windows From application to load WPF modules, due to Microsoft programming guide, they called this kind of application as WPF and Windows Form integration application.

What ever, we now need the integration application to support multiple cultures, is localization.

Let’s start from a simple application, a Windows Form application load a WPF control.

Continue reading

Visual Studio Online Service Down Today

This is the first time I meet Microsoft Visual Studio Online Service down, I could not connect to my VS Online Projects, they might call it is User Hub. Some of my source code are on VS Online.

When I tried to login the VS Online account, I could access Visualstudio.com home page without problem, but could not access user hub, got the following error sometimes, or just a timeout message:

Continue reading

Visual Studio 2013 Installer Projects

I have mentioned in my previous blog Microsoft removed nice Setup Project after Visual Studio 2010, and forced developer to use  the 3rd party tool: InstallShield Limited Edition.

But, normally developers do NOT like using InstallShield Limited Edition since we have to install the limited edition with license number, even it is free but still not convenient if we changed the developer machine or copy source code to another developer. and, problems are not only this, please read the user voice and votes:

Continue reading

One solution for HTTP Error 500.21 – Internal Server Error

When I set IIS web server, I met multiple times about HTTP Error 500.21 – Internal Server Error.

I can not remember what the error screen exactly was, next time I must copy the screen.

I always forget how I got big help using a fast solution:

JUST RUN the command aspnet_regiis.exe –i

Very simple but you have to know it is not always working, but it is the one of you can choose to try.

How about no more Silverlight 6 ?

I am considering what solution will be a good replacing solution if Microsoft really no more have new Silverlight edition like Silverlight 6, I tried using JavaScript way (or JavaScript library such as jQuery) and found for non-small data realtime data, JavaScript solution is worse than Silverlight solutions.

But, is there really no better solution if we do not use Silverlight? we will not choose flash because if we will not use Silverlight why we should use similar tech solution?

Continue reading

WPF: Follow Parent’s Size 1

There are different ways to get child size follows parent’s size, here I collect 3 of them first:

1:
<…. Parent container > (note: StackPanel not work maybe? not sure here)

<TextBox Width="{Binding ElementName=ParentContainer, Path=ActualWidth}"
    Text="Text" HorizontalAlignment="Left" MaxWidth="200" />
</…. Parent container >

2: Using DataTemplate:
Width="{Binding ActualWidth,RelativeSource={RelativeSource FindAncestor, 
AncestorType={x:Type ScrollContentPresenter}}}"

3: Use Grid:
<Grid>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*" MaxWidth="100"/>
    </Grid.ColumnDefinitions>

    <TextBox Text="Text" />
</Grid>
Anyway, you have to know different case get different result, not guarantee above methods work for your case.