Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Conversation

@shana
Copy link
Contributor

@shana shana commented Feb 22, 2016

Depends on

This PR fixes theme colors so that it's possible to use the xaml designer in VS to see how things look.

Seems like the xaml designer completely borks if a ResourceDictionary implements the Source property (which is kind of mandatory for caching resource dictionaries and doing the runtime theme swapping thing), so I've added a separate build configuration with a define that ifdefs the Source property in our SharedDictionaryManager.cs resource dictionary implementation.

To see things at design time, switch to the XamlDesigner build configuration in VS and build the solution (it should only build GitHub.VisualStudio if you're coming from a debug build, so it should be fast to switch). After that, xaml files should render properly and be designable in the VS xaml designer. Builds with the XamlDesigner configuration will always use the dark theme, so they won't reflect the current theme at runtime (use Debug or Release builds to see theming at runtime).

The Styles\ThemeDesignTime.xaml file in GitHub.VisualStudio defines hardcoded values for the VS colors that we use and loads the dark theme - this xaml file is switched at runtime with the ThemeXXX.xaml file that corresponds to what VS is running. If you prefer designing in another theme, change the theme file that ThemeDesignTime.xaml is loading and change the vs colors to the appropriate theme.

shana and others added 29 commits January 7, 2016 15:35
Quick stub of the VS file apis required for a potential "Get Link"
feature - gets the current file name and line number to build a github
url of it for sharing.
Tests are failing on the buildbot and it looks like it's because one
test is clobbering data for another test. The only thing these tests
share is the global ServiceProvider set, so put these test classes in
the same collection so xunit doesn't parallelize them.
Just want to feel like I'm contributing something. 😛
Any xaml file that includes a SharedDictionaryManager resource
dictionary with the uri "Theme.xaml" will get a themed dictionary
included instead that tracks the VS theme and gets switched at runtime
whenever the VS theme changes.
@shana shana changed the title [WIP] Design time theme colors Design time theme colors Feb 23, 2016
@shana
Copy link
Contributor Author

shana commented Feb 23, 2016

This is ready for review, but for some reason the PR view (at least for me) is not getting updated to reflect the commits that went into master as part of PR #191, which this branch is based upon. I've reported that bug, and in the meantime if the PR diff is still showing too much unrelated info, use master...shana/theme-colors to review.

@shana shana closed this Feb 23, 2016
@haacked haacked deleted the shana/theme-colors branch February 23, 2016 21:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants