[C# MSCE 10.16] Detect which Themed UI is active

In the User>Preferences>Look and Feel settings there is now an entry for "Apply Dark Themed UI". When that is enabled in our Forms based applications you can no longer see the text in the grid view unless you select it. The grid view is using default forms white for background & black text, I'm assuming the Dark UI is just changing windows black text to white (which doesn't show on a white background.

Is there a way to detect if the Dark UI theme is active?

Parents
  • Is there a way to detect if the Dark UI theme is active?

    I can't answer your question, but I found this note in the MicroStationAPI help, under topic GettingStartedMdl.h...

    Color Schemes

    Some color schemes have been introduced that mimic the Office 2007 Silver, Blue and Black (Dark Gray) themes. This can be set via "Workspace menu > Preferences > Look and Feel". More color themes will be added and we will work on applying those themes across MDL, WinForms and WPF windows and controls.

    Perhaps Bentley Systems are working on the themes API.  Can confirm that?

     
    Regards, Jon Summers
    LA Solutions

  • Hi  and 

    I have drafted some of the information below in hope it helps answer this and a couple other related UI design questions/considerations.

    See Topic: GUI (UI/UX) - MicroStation Programming - Wiki

    HTH,
    Bob

    MicroStation Application Dark Theme UI Design Considerations

    • MicroStation CONNECT Update 15 and later provide a Dark Mode (Dark Theme) user preference.
    • Application Developers are encouraged to:
      • Define Dialog Icons as .ICO files to more easily support Dark Theme mode
      • Convert Gray scale icons to colorized to help ensure consistency and blend in
    • Applications can determine if Dark Theme is enabled by checking the user preference access string, like this MicroStation VBA Code Snip:

    Sub QuickTest()
    
       DisplayCExpression "userPrefsP->flags.useDarkTheme"
    
    End Sub
    
    Function DisplayCExpression(expression As String) As Variant
    
       Dim result
       result = GetCExpressionValue(expression)
       Debug.Print expression & " = " & result
       DisplayCExpression = result
    
    End Function

    • At this time MicroStation does not provide additional Dark Theme APIs due to MicroStation Dark Theme UI Design requirements to integrate with multiple host operating systems and respective application design and customization capabilities.
    • MicroStation's Dark Theme is based on Apple and Microsoft UI Design guidelines (color and icons) related to designing for dark mode (and other high contrast) "themes"; that users may choose to modify/customize further. Apple suggests using a contrast ratio between 7:1 and 4.5:1.



Reply
  • Hi  and 

    I have drafted some of the information below in hope it helps answer this and a couple other related UI design questions/considerations.

    See Topic: GUI (UI/UX) - MicroStation Programming - Wiki

    HTH,
    Bob

    MicroStation Application Dark Theme UI Design Considerations

    • MicroStation CONNECT Update 15 and later provide a Dark Mode (Dark Theme) user preference.
    • Application Developers are encouraged to:
      • Define Dialog Icons as .ICO files to more easily support Dark Theme mode
      • Convert Gray scale icons to colorized to help ensure consistency and blend in
    • Applications can determine if Dark Theme is enabled by checking the user preference access string, like this MicroStation VBA Code Snip:

    Sub QuickTest()
    
       DisplayCExpression "userPrefsP->flags.useDarkTheme"
    
    End Sub
    
    Function DisplayCExpression(expression As String) As Variant
    
       Dim result
       result = GetCExpressionValue(expression)
       Debug.Print expression & " = " & result
       DisplayCExpression = result
    
    End Function

    • At this time MicroStation does not provide additional Dark Theme APIs due to MicroStation Dark Theme UI Design requirements to integrate with multiple host operating systems and respective application design and customization capabilities.
    • MicroStation's Dark Theme is based on Apple and Microsoft UI Design guidelines (color and icons) related to designing for dark mode (and other high contrast) "themes"; that users may choose to modify/customize further. Apple suggests using a contrast ratio between 7:1 and 4.5:1.



Children
No Data