Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing Just ComboBox Fails #3049

Closed
adamhewitt627 opened this issue Jan 17, 2023 · 2 comments · Fixed by #3098
Closed

Importing Just ComboBox Fails #3049

adamhewitt627 opened this issue Jan 17, 2023 · 2 comments · Fixed by #3098
Labels
Milestone

Comments

@adamhewitt627
Copy link

Bug explanation

I want to pull in a few Material controls, but I'm not ready to let MDIX drive the entire application. While the below approach works for a CheckBox or RadioButton it fails on ComboBox.

ERROR: Exception: Cannot find resource named 'MaterialDesignThemes.Wpf.ComboBoxPopup.

<Application.Resources>
  <ResourceDictionary>
    <ResourceDictionary.MergedDictionaries>
      <materialDesign:BundledTheme BaseTheme="Light" PrimaryColor="DeepPurple" SecondaryColor="Lime" />

      <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.ComboBox.xaml" />

      <!-- WORKAROUND: Import this as well, problem goes away
      <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.ToolBar.xaml" />
      -->
    </ResourceDictionary.MergedDictionaries>

    <Style TargetType="{x:Type ComboBox}" BasedOn="{StaticResource MaterialDesignComboBox}" />
  </ResourceDictionary>
</Application.Resources>

Version

4.7.1

@adamhewitt627 adamhewitt627 added bug evaluation required Items is pending review or evaluation by the team labels Jan 17, 2023
@Keboo Keboo removed the evaluation required Items is pending review or evaluation by the team label Jan 17, 2023
@Keboo Keboo added this to the 5.0.0 milestone Jan 17, 2023
@Keboo
Copy link
Member

Keboo commented Jan 17, 2023

As part of the 5.0.0 code generation, it would be nice to generate UI tests that, assert that all resource dictionaries can be loaded independently.

@Keboo Keboo modified the milestones: 5.0.0, 4.8.0 Jan 23, 2023
@adamhewitt627
Copy link
Author

MdixComboRepro.zip

Full repro project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants