in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

URGENT, Transition to new C1Commands degraded UI

Last post 02-25-2008 5:24 AM by mindril. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 01-18-2008 2:35 PM

    URGENT, Transition to new C1Commands degraded UI

    My team and I recently upgraded to the new version of the .NET toolset which includes the C1.Win.C1Commands.2.dll version 2.0.20073.19306. We've upgraded from version 2.0.20053.139. This change has led me to understand that the LookAndFeel property has been replaced by the VisualStyle property. But this has had a huge impact on our GUI. Attached is a picture which shows the difference between the looks that we had and now have. Let me explain what we previously had.

     
    Peviously, I had toolbars, menus, and contextmenus use the LookAndFeel property with the Office2003 style. From their, I would set blue backgrounds as can be seen in the attachment. This would give a blue toolbar with gradient backgrounds (and menus with gradient sides).

     
    Now, with the new VisualStyle property, I must set it to Custom in order to set my custom colors, HOWEVER, i've lost all gradients on toolbars and menus, thus giving an old and ugly look.

     
    How can I achieve my custom colors and gradients with the new controls ???

     
    Thank you for your help !
     

  • 01-25-2008 4:41 PM In reply to

    Re: URGENT, Transition to new C1Commands degraded UI

    Can anyone from C1 explain this please?

    I'm still waiting for some help on this issue...

     
    Thank you. 

  • 01-28-2008 11:35 AM In reply to

    • C1_GregL
    • Top 10 Contributor
    • Joined on 06-11-2007
    • Pittsburgh PA
    • Posts 515

    Re: URGENT, Transition to new C1Commands degraded UI

    This is a bit of a workaround, but you can do OwnerDraw for the CommandLinks and fill the buttons with a gradient

    For Each lnk As C1CommandLink In C1ToolBar1.CommandLinks
    lnk.OwnerDraw =
    True
    Next

     

    Private Sub C1ToolBar1_DrawLink(ByVal sender As System.Object, ByVal e As C1.Win.C1Command.DrawLinkEventArgs) Handles C1ToolBar1.DrawLink

       Dim
    gBrush As LinearGradientBrush = New LinearGradientBrush(e.Bounds, Color.FromArgb(126, 192, 238), Color.FromArgb(119, 136, 153), LinearGradientMode.Vertical)
       Dim region As New System.Drawing.Region(e.Bounds)
       e.Graphics.FillRegion(gBrush, region)
    End Sub

     

    The code above gives a gradient for the buttons normal state.  Or you could set the background image of the C1ToolBar to a gradient strip like the one attached. 

    Hope that helps,
    Greg

    Filed under: ,
  • 01-28-2008 1:06 PM In reply to

    Re: URGENT, Transition to new C1Commands degraded UI

     Thank you Greg, I appreciate it, I will give it a try.    :)

  • 02-25-2008 5:24 AM In reply to

    Re: URGENT, Transition to new C1Commands degraded UI

    Hello everyone,

    We have faced the same issue. So the question (for the C1 team) is - do you plan to restore the ability to set custom gradients in C1Toolbar? Without such a feature the toolbars are much less useful for us as we don't want to stick to the one of the predefined color sets.

    Regards,

    Grzegorz 

Page 1 of 1 (5 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.