Skip to content

add ItemsSource docs in combobox.md #646

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ibram-reda
Copy link
Contributor

@ibram-reda ibram-reda commented Apr 11, 2025

  • add ItemsSource the breaking changes In V11.0

  • fix the last example
    - disable the compiled binding to make it work effortlessly
    - GetInstalledFontFamilyNames method is no more avalible!
    - use ItemsSource insted of Items

- add ItemsSource [the breaking changes In V11.0](https://github.com/AvaloniaUI/Avalonia/wiki/Breaking-Changes#itemscontrol-changes-including-all-itemscontrol-inherited-controls-like-listbox-or-menus)

- fix the last example 
        - disable the compiled binding to make it work effortlessly
        - `GetInstalledFontFamilyNames` method is no more avalible! 
        - use `ItemsSource`  insted of `Items`
@@ -91,7 +92,7 @@ This example binds the items in a combo box using a data template. The C# code-b
```xml
<StackPanel Margin="20">
<ComboBox x:Name="fontComboBox" SelectedIndex="0"
Width="200" MaxDropDownHeight="300">
Width="200" MaxDropDownHeight="300" x:CompileBindings="False">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation shouldn't encourage users disabling compiled bindings. It's a bad (potentially app breaking) practice.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this PR intention is to make this work running from simple copy pasting, consider adding x:DataType with expected type in the DataTemplate, x:DataType="FontFamily" I suppose.

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

Successfully merging this pull request may close these issues.

2 participants