public PropertyOrigin GetThemePropertyOrigin( int partId, int stateId, int propertyId) { HResult hr = UxThemeExNativeMethods.UxGetThemePropertyOrigin( themeFile, theme, partId, stateId, propertyId, out PropertyOrigin origin); return(hr.Succeeded() ? origin : PropertyOrigin.NotFound); }