I've been working with the AppStylist and I'm really loving it. One difficulty I'm having is that I'd like for the color of my Ribbon to be the same as the color of the client area on my form. That works ok, but I am getting a 1px line stretching all the way across the bottom of the ribbon that is the same color as the RibbonTabItemArea. I've tested this by changing the RibbonTabItemArea's color to hot pink and this 1px line below the ribbon also turned hot pink. Any ideas on how to remedy that?
Hello Matt,
This can be achieved with a DrawFilter, to remove the UIElements that are drawn as part of the Ribbon bottom borders. I attached a small sample demonstrating this with Office2013 style.
Michael, thanks for the reply, this is definitely what I am looking for. However, this doesn't work with my toolbars manager for some reason. I've attached your sample, just replaced the toolbars manager you had there with my toolbars manager. This code does not seem to work for this case. Help?
I've made improvements to the draw filter.
The parent UltraToolbarsDockAreaUIElement and underlying RibbonTabPageShadowUIElement are at fault with the apperances you have set.
Please review the modified sample and let me know if you have any questions.
Michael, I very much appreciate your efforts in this matter. I apologize, but I'm sending this back again. After applying a style sheet that I've been working up, this code doesn't work. I wish I better understood exactly what was going on here so that I could effectively address this myself, but I am obviously clueless on the inner workings.
I've attached the sample with a .isl file loaded.
Please let me know what I can do here..
Thanks again, really very much appreciate it.
With your style applied now, the bottom border is now drawn from the RibbonTabAreaUIElement child element instead from the main parent, UltraToolbarsDockAreaUIElement as before.
Please modify the if statement inside GetPhasesToFilter method to the following code below. You will also want to decrease the Rectangle's Height by one pixcel inside DrawElement method. Before, I was able to get this working without resizing the UIElements.
public DrawPhase GetPhasesToFilter(ref UIElementDrawParams drawParams){ if (drawParams.Element is UltraToolbarsDockAreaUIElement) return DrawPhase.BeforeDrawBackColor; return DrawPhase.None;}
public DrawPhase GetPhasesToFilter(ref UIElementDrawParams drawParams){ if (drawParams.Element is UltraToolbarsDockAreaUIElement) return DrawPhase.BeforeDrawBackColor;
return DrawPhase.None;}
I've attached the sample demonstrating this as well. Let me know if you have any questions regarding this matter.