FloatRangeConverter |
Converts String to a RangeTValue and vice versa.
| |
IdenticonElement |
Element that renders and displays an identicon.
|
To use Jdenticon in a WPF application, start with installing the Jdenticon.Wpf NuGet package.
PM> Install-Package Jdenticon.Wpf
Now you can add the IdenticonElement where in your application. Don't forget to add the Jdenticon XML namespace.
<Window x:Class="SampleApp.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="MainWindow" Height="250" Width="600"> <Window.Resources> <Style TargetType="{x:Type jd:IdenticonElement}"> <Setter Property="Width" Value="100" /> <Setter Property="Height" Value="100" /> <Setter Property="Margin" Value="10" /> </Style> </Window.Resources> <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> <jd:IdenticonElement Value="icon1" /> <jd:IdenticonElement Value="icon2" /> <jd:IdenticonElement Value="icon3" /> <jd:IdenticonElement Value="icon4" /> </StackPanel> </Window>
This is the resulting application:
To make the identicon useful you probably want to make a binding to the Value property. The value decides what the icon will look like.
<jd:IdenticonElement Value="{Binding Path=UserID}" />