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

TagInput 嵌套在 StackPanel 时,如果 Orientation="Horizontal" ,程序会闪退。 #473

Closed
Soar360 opened this issue Nov 9, 2024 · 1 comment

Comments

@Soar360
Copy link
Contributor

Soar360 commented Nov 9, 2024

如题

            <StackPanel Orientation="Horizontal">
                <TextBlock Text="尺码名称:" VerticalAlignment="Center" />

                <u:TagInput
                    AllowDuplicates="False"
                    HorizontalAlignment="Left"
                    Separator=";"
/>
            </StackPanel>

报错信息:
Unhandled exception. System.InvalidOperationException: Invalid size returned for Measure.
at Avalonia.Layout.Layoutable.Measure(Size availableSize)
at Avalonia.Layout.Layoutable.MeasureOverride(Size availableSize)
at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
at Avalonia.Layout.Layoutable.Measure(Size availableSize)
at Avalonia.Layout.LayoutHelper.MeasureChild(Layoutable control, Size availableSize, Thickness padding, Thickness borderThickness)
at Avalonia.Controls.Border.MeasureOverride(Size availableSize)
at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
at Avalonia.Layout.Layoutable.Measure(Size availableSize)
at Avalonia.Layout.Layoutable.MeasureOverride(Size availableSize)
at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
at Avalonia.Layout.Layoutable.Measure(Size availableSize)
at Avalonia.Layout.Layoutable.MeasureOverride(Size availableSize)
at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
at Avalonia.Layout.Layoutable.Measure(Size availableSize)
at Avalonia.Layout.LayoutHelper.MeasureChild(Layoutable control, Size availableSize, Thickness padding, Thickness borderThickness)
at Avalonia.Controls.Border.MeasureOverride(Size availableSize)
at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
at Avalonia.Layout.Layoutable.Measure(Size availableSize)
at Avalonia.Layout.Layoutable.MeasureOverride(Size availableSize)
at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize)
at Avalonia.Layout.Layoutable.Measure(Size availableSize)
at Avalonia.Controls.StackPanel.MeasureOverride(Size availableSize)

@rabbitism
Copy link
Member

必须要有一个宽度

@Soar360 Soar360 closed this as completed Nov 10, 2024
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

No branches or pull requests

2 participants