XAML TabIndex dosen't work.

Published 11/3/2017 by Christian

I've just been struggling with getting the TabIndex on XAML controls to work for an hour. Getting quite frustrated I can asure you. 

Anyway - after searching the o' Google to no awail, it occured to me that maybe Visual Studio needed to completely rebuild the app to kind of re-tab-index-ing the controls, so I ended up deleting the 'obj' and 'bin' folders - and Voilà!- all of a sudden all my TabIndex's worked.

 

As always feel to ask or comment.


Replaceing the default difference/merge tool in Visual Studio with WinMerge is fairly easy, but I keep forgetting, so I figured I'd do a quick write-up.

Subversion (SVN)

After installing WinMerge, in Visual Studio, go to 

Tools -> Options -> Source Control and depending on your Source Control selection (in the case here Subversion) look for a 'Tools' menu (with Subversion its under Subversion User Tools):

If you are using Subversion/TortoiseSVN you can simply select WinMerge from the 'External Diff Tool' and 'External Merge Tool' combo boxes:

 

As always feel to ask or comment.


.RemoveWhere extension

Published 11/1/2017 by Christian

Hi All,

 

Just a quick extension this time.

This one returns an IEnumerable<T> where all source items that fulfills a given conditions has been removed.

I've called it RemoveWhere.

 

Anyway - here you are:

public static IEnumerable<TSource> RemoveWhere<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> removeSelector)
{
	List<TSource> result = new List<TSource>();
	foreach (var s in source)
	{
		if (!removeSelector(s))
		{
			result.Add(s);
		}
	}

	return result; 
}

Can be used as:

WarehousePrinters = info.Printers.RemoveWhere(p => string.IsNullOrEmpty(p.PrinterID)).ToList();

As always feel to ask or comment.