Hi,
I have problems for removing the border lines in my tree print.Do someone know witch property must be setted for a result without visible borders ?
Thanks
Thank you for posting in our forums.
What you can do in order to achieve this is to handle the InitializeTree event of the UltraPrint document and set the BorderStyle of the printed control to None:
private void ultraTreePrintDocument1_InitializeTree(object sender, Infragistics.Win.UltraWinTree.Printing.InitializeTreeEventArgs e)
{
e.Control.BorderStyle = Infragistics.Win.UIElementBorderStyle.None;
}
This way the tree will be printed without borders. Also note that this change will not affect the actual UltraTree on your form. It will keep it border style.
I am looking forward to hearing from you.
Ok, thank you for the advice.I'll try that and I'll let you know.
Regards
I have tested your sample and it works by me too.
It's seems to be exactly the same code as by me but I will see it again.
The BorderStyle might be overridden by an isl. Are you loading a Style Library into your application? Check for "StyleManager.Load" in your code if you are not sure.
Yes, you're right, we are using many times this instruction in our application, the problem must come from there.
This therefore means that we can not do anything else for removing the borders?
In AppStylist there is a property for each component called ResolutionOrder. With this property you can control if the settings set on the control or the settings set in AppStylist have precedence. If for the UltraTree this property is set to ControlThanApplication then the settings that are set on the control will have precedence and the suggestion I gave you will work. In order to set it go to the Navigation tab, hover the UltraTree and press “C” when the tooltip pops up. Then you can find the property in the Property Grid in the bottom right.
Please let me know if you have any additional questions.
It works finally!!I have enter this code so as you said and the borders have disappeared :
private void printDoc_InitializeTree(object sender, InitializeTreeEventArgs e) { e.Control.ImageList = _tree.ImageList; e.Control.UseAppStyling = false; e.Control.BorderStyle = Infragistics.Win.UIElementBorderStyle.None; }
Thank you veruy much for all your help.