Sunan Ibn Majah, Book 33, Hadith 148 (In-Book) ⓘ
It was narrated that 'Aishah said: "When the Messenger of Allah saw something he liked, he would say: 'Al-hamdu lillahil-ladhi bi ni'matihi tatimmus-salihat (Praise is to Allah by Whose grace good deeds are completed).' And if he saw something that he disliked, he would say: 'Al-hamdu lillahi 'ala kulli hal (Praise is to Allah in all circumstances).'"
حَدَّثَنَا هِشَامُ بْنُ خَالِدٍ الأَزْرَقُ أَبُو مَرْوَانَ، حَدَّثَنَا الْوَلِيدُ بْنُ مُسْلِمٍ، حَدَّثَنَا زُهَيْرُ بْنُ مُحَمَّدٍ، عَنْ مَنْصُورِ بْنِ عَبْدِ الرَّحْمَنِ، عَنْ أُمِّهِ، صَفِيَّةَ بِنْتِ شَيْبَةَ عَنْ عَائِشَةَ، قَالَتْ كَانَ رَسُولُ اللَّهِ ـ صلى الله عليه وسلم ـ إِذَا رَأَى مَا يُحِبُّ قَالَ " الْحَمْدُ لِلَّهِ الَّذِي بِنِعْمَتِهِ تَتِمُّ الصَّالِحَاتُ " . وَإِذَا رَأَى مَا يَكْرَهُ قَالَ " الْحَمْدُ لِلَّهِ عَلَى كُلِّ حَالٍ " .
also referenced under: Hadith 3803 (Reference) & Volume 5, Book 33, Hadith 3803 (DarusSalam)