Answers for "ivalueconverter wpf foreground"

0

ivalueconverter wpf foreground

<Window.Resources>
        <local:YesNoToBooleanConverter x:Key="YesNoToBooleanConverter" />
        <local:ColorConverter x:Key="ColorConverter"></local:ColorConverter>
        <local:EnumColorConverter x:Key="EnumColorConverter"></local:EnumColorConverter>
    </Window.Resources>
    <Grid>
       
        <StackPanel Margin="10">
            <TextBox Name="txtValue" />
            <WrapPanel Margin="0,10">
                <TextBlock Text="Current value is: " />
                <!--<TextBlock Text="{Binding ElementName=txtValue, Path=Text, Converter={StaticResource ColorConverter}}"></TextBlock>-->
            </WrapPanel>
            <Label Content="⬤" Foreground="{Binding ElementName=txtValue,Path=Text,Converter={StaticResource EnumColorConverter}}"></Label>
        </StackPanel>
    </Grid>
Posted by: Guest on August-20-2021

Browse Popular Code Answers by Language