Erwin, you have very valid points in your last post. For one, it will indeed take some time to get everything loaded up and shown on the screen.
E!, we would like to research why the slow loading occurs on your end - we did not see any tickets on the matter in your account. Could you give us more details, such as What/how many RadControls do you have on the form and in the Dock?
I did a quick test with RadForm vs standard form with about twenty controls and the in loading is much less than a
second. Probably the loading of the controls inside the form takes some
time, but we would like to research that.
I have researched the flickering further and am sending a workaround which will take care of some of the flickering, including the showing of a child RadForm. Insert the following code in the form's constructor before the call to InitializeComponent():
| Type[] types = Assembly.GetAssembly(typeof(RadElement)).GetTypes(); |
| for (int i = 0; i < types.Length; i++) |
| { |
| if (types[i].Name == "ContextLayoutManager") |
| { |
| PropertyInfo prop = types[i].GetProperty("LayoutManager", |
| BindingFlags.Static | BindingFlags.Public); |
| MethodInfo mi = prop.GetGetMethod(); |
| object clm = mi.Invoke(null, new object[] { }); |
| PropertyInfo le = types[i].GetProperty("LayoutEvents", |
| BindingFlags.NonPublic | BindingFlags.Instance); |
| mi = le.GetGetMethod(true); |
| List<EventHandler> eventHandlers = (List<EventHandler>)mi.Invoke(clm, new object[]{ }); |
| eventHandlers.Clear(); |
| break; |
| } |
| } |
This should be done for all RadForms. With this code, RadForm will take less time to repaint, which means that you will see better loading times. This workaround will not be needed in the next release, as this will be fixed.
There are couple of other reasons for the flickering:
- Low level issues - we are investigating why some messages and
certain APIs are called multiple times between the top-level windows;
- Other flickering can be avoided only with double buffering
and invalidate/clipping logic (which is not available in the non-client
area). It will take time to write the code to do these things.
Again, we are sorry for the inconvenience. RadForm was introduced just a couple of months ago and it has some issues, which are fixing on the go.
As a final resort, you can try the ShapedForm and see whether it would help. There are instructions on its usage in the documentation.
I will be happy to hear your feedback on the above workaround.
Kind regards,
Vassil
the Telerik team
Check out
Telerik Trainer, the state of the art learning tool for Telerik products.