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

XAML designer chokes on scrolling list boxes #1

Open
devuxer opened this issue Sep 8, 2015 · 2 comments
Open

XAML designer chokes on scrolling list boxes #1

devuxer opened this issue Sep 8, 2015 · 2 comments

Comments

@devuxer
Copy link

devuxer commented Sep 8, 2015

List boxes have stopped working in the designer since upgrading to Visual Studio 2015.

The following exception occurs if the items in the list box exceed the height of the list box:

InvalidOperationException: 'Color(#FFFFFFFF)' is not a valid value for property 'Color'.
StackTrace
at System.Windows.DependencyObject.EvaluateExpression(EntryIndex entryIndex, DependencyProperty dp, Expression expr, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry newEntry)
at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
at System.Windows.Baml2006.WpfKnownMemberInvoker.SetValue(Object instance, Object value)
at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(XamlMember member, Object obj, Object value)
at MS.Internal.Xaml.Runtime.ClrObjectRuntime.SetValue(Object inst, XamlMember property, Object value)
InnerException: None

If you uncomment the last ListBoxItem in this code, the designer will choke on it:

<ListBox Margin="0,10,0,0" Width="200" Height="241">
    <ListBoxItem Content="Afghanistan (AFG)" />
    <ListBoxItem Content="Åland Islands (ALA)" />
    <ListBoxItem Content="Albania (ALB)" />
    <ListBoxItem Content="Algeria (DZA)" />
    <ListBoxItem Content="American Samoa (ASM)" />
    <ListBoxItem Content="Andorra (AND)" />
    <ListBoxItem Content="Angola (AGO)" />
    <ListBoxItem Content="Anguilla (AIA)" />
    <ListBoxItem Content="Antarctica (ATA)" />
    <ListBoxItem Content="Antigua and Barbuda (ATG)" />
    <!--<ListBoxItem Content="Argentina (ARG)" />-->
</ListBox>
@StanislawSwierc
Copy link
Owner

Thank you for reporting this problem devuxer! I was able to reproduce it in my Microsoft Visual Studio Enterprise 2015 (14.0.23107.0). I included your sample code for ListBox in the ThemeBrowser to make it easier for others to see (71b640c). Not only did I see it for ListBox, but for other controls as well. This looks like a problem in the designer to me and I will try to escalate it to WPF Team.

So far I haven't found a workaround. I will update this issue when I get more information.

@harikmenon
Copy link

Thanks for reporting this issue. We have opened a bug on our end to look into this issue for the next public release of Visual Studio 2015

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

3 participants