Implement treeview sorting in WPF backend.