Show correct style at design time

Pino Carafa 121 Reputation points
2021-01-13T15:57:49.043+00:00

Hi there. I got a new laptop and installed visual studio 2019 on it. All is well, except for one niggling issue.

In my application XAML I have defined an object to store certain style values:

<Application.Resources>
    <KHSkins:AppSkin x:Key="MyAppSkin"></KHSkins:AppSkin>

(KHSkins is a project we created and that exposes an AppSkin project that, in turn, has a number of properties)

In the XAML of a page:

            <dxg:GridControl x:Name="gSectionDocuments"                               
                             AutoGenerateColumns="None"
                             Grid.Row="1"
                             EnableSmartColumnsGeneration="False"
                             SelectionMode="Row"
                             dx:ThemeManager.ThemeName="{Binding Source={StaticResource MyAppSkin}, Path=DevExpressTheme, Mode=OneWay}"
                             dx:DXSerializer.SerializationID="gSectionDocuments"
                             dx:DXSerializer.StoreLayoutMode="UI"
                             AllowDrop="True"
                             AutoPopulateColumns="False">

The DevExpressTheme property on MyAppSkin has a default value of a specific "Theme Name". Its value is not important. Suffice to say that its default value is one that makes the DevExpress Grid look "flat", whereas the default "Theme Name" makes it look like a Microsoft Office application from the early noughties. AWFUL.

Now please note that this doesn't affect the way it looks at run time. At run time everything's fine and the grid looks exactly the way I want it to look.

But in the IDE when I look at the Designer it looks like bleep

The mad thing is..... On my old laptop, when I open the exact same project with the exact same code in it, it looks fine in the IDE.

Is there some "setting" I've missed in the VS 2019 IDE on my new laptop?

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,671 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,606 questions
0 comments No comments
{count} votes

Accepted answer
  1. Dylan Zhu-MSFT 6,406 Reputation points
    2021-01-14T03:07:32.723+00:00

    Hi PinoCarafa,

    Please try to delete .vs folder which is used to store related configurations of visual studio, and re-open your visual studio.

    Best Regards, Dylan

    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our * *documentation* to enable e-mail notifications if you want to receive the related email notification for this thread.**


0 additional answers

Sort by: Most helpful