Take the following code for example;
if (Convert.ToString(frm.WindowState) == "Minimized")
Layout.WindowState = "Maximized";
else
Layout.WindowState = Convert.ToString(frm.WindowState);
We are analysing the string definition of the window state, i.e. "Minimized".
Would this string description change between cultures?
Lastly, whilst on this code, is there an Enum which we could use in order to check against the window state?
Can we refactor this code segment?