Being a typical molecular biologist, I am a little uncomfortable with classical genetics terms. I might redefine some symbols (perhaps to mean the same) [It is like talking to oneself while thinking].
There are four DNA-blocks : A1, B1, A2 and B2. Ak and Bk are adjacent blocks. [Perhaps this is same as what you defined the symbols as]. A and B are contiguous DNA regions whereas 1 and 2 are different chromosomes (homologous regions). See the figure below.

The formula:
D=X11X22 - X12X21
basically means that the difference between the probability that the loci are in configuration I
(11 & 22
) or configuration II (swapped)
(12 & 21
). Lets say there is a third region (3) which is homologous to the two alleles which has DNA-blocks A3 and B3.
As LD is defined it is a difference in probabilities. Depending on how you define, it will take a negative or a positive value. When you have 3 recombinationally feasible alleles then there can be six cases:
- C1: [A1B1] [A2B2] [A3B3]
- C2: [A1B1] [A2B3] [A3B2]
- C3: [A1B3] [A2B2] [A3B1]
- C4: [A1B2] [A2B1] [A3B3]
- C5: [A1B2] [A2B3] [A3B1]
- C6: [A1B3] [A2B1] [A3B2]
In this case there is no single measure for difference. You can also do something like this:
LD1' = P(C1) + P(C2) - (P(C3) + P(C4) + P(C5) + P(C6))
Where LD1' is LD of region 1 and P(Cm) is the frequency of mth configuration.
Now, if there are 3 or more adjacent DNA blocks, you can only define LD, pairwise. It however, makes sense because linkage reduces with distance and you can calculate LDAC = LDAB x LDBC
(A,B and C are contiguous in alphabetical order. If A and B are not linked then A and C cannot be linked.)