Making the parsing of a String to an Int32 robust (valid, positive, not 0 validation)
First: parsing

The shortest you can do is

int uiScale;
return 
    int.TryParse(ConfigurationManager.AppSettings.Get("UiScale")‌​, out uiScale) 
    &amp;&amp; uiScale!= 0 ? Math.Abs(uiScale) : 1 ;




Second: style

uiScale

This method should be called either GetUiScale or be a property if named UiScale because in C# we use PascalCase for public members and methods usually contain a verb (where it makes sense).

retint

Don't just call it like this. It's better to use the real name that better describes the purpose of the variable so uiScale would be fine.