Skip to content
New issue

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

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

Already on GitHub? # to your account

[BUG] ComboBox ItemTemplate issue #7

Closed
craftersmine opened this issue Mar 5, 2024 · 1 comment
Closed

[BUG] ComboBox ItemTemplate issue #7

craftersmine opened this issue Mar 5, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@craftersmine
Copy link
Owner

Describe the bug
ComboBox items doesn't respect ItemTemplates.

To Reproduce

  1. Make a combobox
  2. Add ItemTemplate tag
  3. Implement basic templating
  4. Run the app and expand combobox

Expected behavior
ComboBox items should correctly use ItemTemplates.

Screenshots
image

Example XAML

<ComboBox Grid.Row="1" Margin="0 8 0 0" ItemsSource="{Binding Source={x:Static local:ApplicationSettingsWindow.Cultures}}">
    <ComboBox.ItemTemplate>
        <DataTemplate DataType="{x:Type globalization:CultureInfo}">
            <TextBlock>
                <Run Text="{Binding Path=DisplayName, Mode=OneWay}"/> (<Run Text="{Binding Path=EnglishName, Mode=OneWay}"/>)
            </TextBlock>
        </DataTemplate>
    </ComboBox.ItemTemplate>
</ComboBox>

Desktop (please tell as much as you can/want/know):

  • OS: Windows 11 x64 23H2 Release Channel
  • .NET version 6.0.414
  • Library version: 1.3.1
@craftersmine craftersmine added the bug Something isn't working label Mar 5, 2024
@craftersmine craftersmine self-assigned this Mar 5, 2024
@craftersmine craftersmine linked a pull request Mar 5, 2024 that will close this issue
@craftersmine craftersmine removed a link to a pull request Mar 5, 2024
craftersmine added a commit that referenced this issue Mar 5, 2024
Fixed an issue with combobox item templates #7
@craftersmine
Copy link
Owner Author

PR #8 fixed this issue

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant