public string GetThemeString(int partId, int stateId, int propertyId) { var value = new StringBuilder(512); HResult hr = UxThemeExNativeMethods.UxGetThemeString( themeFile, theme, partId, stateId, propertyId, value, value.Capacity); return(Found(hr) ? value.ToString() : null); }