locked
Values for 'Uid' property must be Text_for style on listbox

    Question

  • <Style x:Name="foo" TargetType="ListBox">
                                <Setter Property="Background">
                                    <Setter.Value>
                                        <!-- Your resources go here. -->
                                        <SolidColorBrush x:Uid="{ThemeResource ListBoxFocusBackgroundThemeBrush}" Color="Green"/>
                                    </Setter.Value>
                                </Setter>
                            </Style>


    Error Values for 'Uid' property must be Text
    Thursday, April 09, 2015 2:41 PM

Answers

  • What are you trying to do here?

    As the error states, the x:Uid must be plain text. You cannot bind it to a brush.

    The Uid is used for localization to identify which localized resource to use. It makes no sense in the SolidColorBrush context.

    Thursday, April 09, 2015 4:30 PM
    Owner

All replies

  • What are you trying to do here?

    As the error states, the x:Uid must be plain text. You cannot bind it to a brush.

    The Uid is used for localization to identify which localized resource to use. It makes no sense in the SolidColorBrush context.

    Thursday, April 09, 2015 4:30 PM
    Owner
  • x:UId show error states ,it doesn't support text.

    I'm trying to replace the text to red or other color on lisbox when be clicked. Default is black.

    Friday, April 10, 2015 12:07 AM