//Header shine opacity.
private int headerShineOpacity = 50;
/// <summary>
/// Gets or sets the headers shine opacity. Value should be between 0 and 255.
/// </summary>
[Category("Colors"), Description("The headers shine opacity")]
public int HeaderShineOpacity
{
get { return headerShineOpacity; }
set
{
if (value < 0 || value > 255)
{
if (DesignMode == false)
{
throw new ArgumentOutOfRangeException("Opacity must be between 0 and 255");
}
else
{
MessageBox.Show("Header shine opacity must be a value between 0 and 255.", "Header Shine Opacity", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
else
{
headerShineOpacity = Clamp(value, 0, 255);
Invalidate();
}
}
}
If I set up a test form and try to change the value to 500 at runtime it throws the exception but points to the code in my DLL. Ho can I get the excpetion to point the user to the line of code where they try to change the value?
Thanks

New Topic/Question
Reply




MultiQuote






|