IdenticonElementValue Property

Gets or sets a value that the generated identicon will be based upon. A string representation of the value will be hashed using SHA1.
public Object Value { get; set; }

Property Value

Object

Examples

Here is an example where the value property is bound to the value of a textbox.

Binding value
<Window x:Class="MySample.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:jd="clr-namespace:Jdenticon.Wpf;assembly=Jdenticon.Wpf"
        Title="Jdenticon WPF Sample" Height="530" Width="450">
    <Grid Margin="25">
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <Label Grid.Row="0" Padding="5,0,5,5">Value to hash:</Label>
        <TextBox x:Name="tbValue" Grid.Row="1" Padding="5" Text="Jdenticon"></TextBox>
        <jd:IdenticonElement Grid.Row="2" Margin="40" Value="{Binding ElementName=tbValue, Path=Text}" />
    </Grid>
</Window>

Here is the outcome:

WPF value binding

See Also

Reference