With the 1335 Treaty of Trentschin and the 1348 Treaty of Namslau, most of the Silesian duchies were ruled by the Silesian Piast dukes under the feudal overlordship of the Bohemian kings, and thus became part of the Crown of Bohemia. In 1476 the Crossen district became part of the Margraviate of Brandenburg, when the widow of the Piast ruler, Barbara von Brandenburg, daughter of Elector Albert Achilles, inherited Crossen. In 1526 Silesia was acquired by Austria's Habsburg Monarchy after the death of King Louis II of Bohemia. Brandenburg contested the inheritance, citing a treaty made with Frederick II of Legnica, but Silesia largely remained under Habsburg control until 1742.. How many years was Silesia under Habsburg control?