The Flying Blue website is a mess, but there's a section which lists all partners, including airlines and how things work with them in terms of XP and miles accrual and redemption.
In the case of Delta:
WITH DELTA AIR LINES, YOU CAN:
- Earn Miles
- Gain XP on eligible flights
- Earn Elite bonus Miles
- Spend Miles
- Extend the overall validity of your Miles
- Enjoy SkyTeam benefits worldwide
EARN MILES AND GAIN XP
Earn Miles and gain XP on:
- Flights marketed as Delta (DL) and operated by one of the SkyTeam airline partners, as per the earning scheme below:
- Flights operated by one of the following Delta Connection carriers: ExpressJet (EV), Compass (CP), GoJet Airlines (G7), Endeavor Air (9E), Republic Airline (YX) or SkyWest (00), with a booking class mentioned in the earning scheme below
Earning Miles and gaining XP isn’t possible for:
- Tickets with a booking class not mentioned in the earning scheme below
- Reward tickets (tickets booked using Miles)
(and more details on the page, including the earning scheme)
In the case of Kenya Airways (which is actually also a SkyTeam partner):
With Kenya Airways, you can:
- Earn Miles
- Gain XP on eligible flights
- Earn Elite bonus Miles
- Spend Miles
- Extend the overall validity of your Miles
- Enjoy SkyTeam benefits worldwide
EARN MILES AND GAIN XP
Earn Miles and gain XP on:
- Flights marketed as Kenya Airways (KQ) and operated by one of the SkyTeam partner airlines, as per the earning scheme below.
- Flights marketed as Kenya Airways (KQ) and operated by Precision Air between Nairobi and Zanzibar, Kilimanjaro, Mombasa or Dar es Salaam; or between Mombasa and Zanzibar, as per the earning scheme below.
- On Domestic flights within Kenya, your XP are doubled.
Earning Miles and gaining XP isn’t possible for:
- Tickets with a booking class not mentioned in the earning scheme below
- Reward tickets (tickets booked using Miles)
(and more details on the page again)
An example of an airline partner on which you DO NOT earn XP is Transavia, though you still earn miles. There used to be a difference between Transavia NL and Transavia FR, but it seems to no longer be the case.
You will note that in many cases, there are restrictions on the carrier operating the flight, so not all code-share flights allow you to earn miles or XP.