Hi,
I noticed something using your Windows controls for the first time: it seems that for some overloads virtualization was not used. For example:
behaves differently from
Control[] ctrl = tabItem2.ContentPanel.Controls.Find(rb.Tag.ToString(), true);
Telerik.WinControls.UI.RadTextBox rtb = (Telerik.WinControls.UI.RadTextBox)ctrl[0];
rtb.Focus();
Based on OO theory and best practices, both should behave the same, but in this case they don't.
From the above example it's noticeable that this problem is generated by the fact that the overload function is not virtual, so the compiler doesn't know to call the correct version based on the object content, instead of using the type.
Was this left like this intentional (and if so why?) or it's just a mishap?
Thanks,
Cristian
I noticed something using your Windows controls for the first time: it seems that for some overloads virtualization was not used. For example:
Control[] ctrl = tabItem2.ContentPanel.Controls.Find(rb.Tag.ToString(), true);
ctrl[0].Focus();
behaves differently from
Control[] ctrl = tabItem2.ContentPanel.Controls.Find(rb.Tag.ToString(), true);
Telerik.WinControls.UI.RadTextBox rtb = (Telerik.WinControls.UI.RadTextBox)ctrl[0];
rtb.Focus();
Based on OO theory and best practices, both should behave the same, but in this case they don't.
From the above example it's noticeable that this problem is generated by the fact that the overload function is not virtual, so the compiler doesn't know to call the correct version based on the object content, instead of using the type.
Was this left like this intentional (and if so why?) or it's just a mishap?
Thanks,
Cristian