|
<ContentPage.Resources>
<ResourceDictionary>
<Style TargetType="sfchat:IncomingMessageAvatarView">
<Setter Property="ControlTemplate">
<Setter.Value>
<ControlTemplate>
<local:AvatarContainer/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="sfchat:OutgoingMessageAvatarView">
<Setter Property="ControlTemplate">
<Setter.Value>
<ControlTemplate>
<local:AvatarContainer/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
</ContentPage.Resources> |
|
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ffimageloading="clr-namespace:FFImageLoading.Svg.Forms;assembly=FFImageLoading.Svg.Forms"
mc:Ignorable="d"
x:Class="GettingStarted.AvatarContainer">
<ffimageloading:SvgCachedImage HeightRequest="40" WidthRequest="40"
HorizontalOptions="StartAndExpand" VerticalOptions="Start" Aspect="Fill"
Source="{TemplateBinding BindingContext.Author.Avatar}" Margin="0"/>
</ContentView> |