Function bindWindowPreferences