B
Bill Fuller
I am trying to determine the type for ActiveControls using 3rd party
controls (Infragistics in this case) during runtime and getting a rather odd
return type at runtime for the UltraWinEditor.
Code shippet is as follows:
if ( ActiveControl.GetType() == typeof(UltraTextEditor))
{
UltraTextEditor tb = (UltraTextEditor) this.ActiveControl;
if (tb.Multiline == true)
return true;
}
I am expecting to see an UltraTextEditor for the ActiveControlType but,
instead, getting "Infragistics.Win.EmbeddableTextBoxWithUIPermissions", so
the "if" statement fails on the control.
If I modify the "if" statement to: "if (ActiveControl.GetType().ToString()
== "Infragistics.Win.EmbeddableTextBoxWithUIPermissions")", the subsequent
cast fails.
Does anyone know what would cause the control type to be different at
runtime than what it was built from?
(BTW, the test form is ONLY using UltraTextEditor controls, so the type
should be the same for each.)
controls (Infragistics in this case) during runtime and getting a rather odd
return type at runtime for the UltraWinEditor.
Code shippet is as follows:
if ( ActiveControl.GetType() == typeof(UltraTextEditor))
{
UltraTextEditor tb = (UltraTextEditor) this.ActiveControl;
if (tb.Multiline == true)
return true;
}
I am expecting to see an UltraTextEditor for the ActiveControlType but,
instead, getting "Infragistics.Win.EmbeddableTextBoxWithUIPermissions", so
the "if" statement fails on the control.
If I modify the "if" statement to: "if (ActiveControl.GetType().ToString()
== "Infragistics.Win.EmbeddableTextBoxWithUIPermissions")", the subsequent
cast fails.
Does anyone know what would cause the control type to be different at
runtime than what it was built from?
(BTW, the test form is ONLY using UltraTextEditor controls, so the type
should be the same for each.)