forked from Eppie-io/Eppie-App
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
References: Eppie-io#382
- Loading branch information
Showing
4 changed files
with
87 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
source/Eppie.App/Eppie.App.UI/Eppie.App.UI.UWP/Controls/EmailsInputControl.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<UserControl x:Class="Tuvi.App.Shared.Controls.EmailsInputControl" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:viewmodels="using:Tuvi.App.ViewModels" | ||
d:DesignHeight="300" | ||
d:DesignWidth="400" | ||
mc:Ignorable="d"> | ||
|
||
<UserControl.Resources> | ||
|
||
<DataTemplate x:Key="SuggestContactItemTemplate" x:DataType="viewmodels:ContactItem"> | ||
<Grid Padding="4"> | ||
<Grid.RowDefinitions> | ||
<RowDefinition /> | ||
<RowDefinition /> | ||
</Grid.RowDefinitions> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="Auto" /> | ||
<ColumnDefinition Width="8" /> | ||
<ColumnDefinition /> | ||
</Grid.ColumnDefinitions> | ||
|
||
<PersonPicture Grid.RowSpan="2" | ||
Width="48" | ||
Height="48" | ||
DisplayName="{x:Bind FullName, Mode=OneWay}" | ||
ProfilePicture="{x:Bind AvatarInfo, Mode=OneWay, Converter={StaticResource ImageInfoToBitmapConverter}}" /> | ||
|
||
<TextBlock Grid.Column="2" | ||
FontSize="16" | ||
Text="{x:Bind FullName, Mode=OneWay}" /> | ||
|
||
<TextBlock Grid.Row="1" | ||
Grid.Column="2" | ||
FontSize="12" | ||
Opacity="0.6" | ||
Text="{x:Bind Email.Address, Mode=OneWay}" /> | ||
|
||
</Grid> | ||
</DataTemplate> | ||
|
||
<DataTemplate x:Key="TokenContactItemTemplate" x:DataType="viewmodels:ContactItem"> | ||
<Grid ToolTipService.ToolTip="{x:Bind Email.Address, Mode=OneWay}"> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="Auto" /> | ||
<ColumnDefinition Width="8" /> | ||
<ColumnDefinition /> | ||
</Grid.ColumnDefinitions> | ||
|
||
<PersonPicture Grid.RowSpan="2" | ||
Width="24" | ||
Height="24" | ||
Margin="0,4,0,0" | ||
DisplayName="{x:Bind FullName, Mode=OneWay}" | ||
ProfilePicture="{x:Bind AvatarInfo, Mode=OneWay, Converter={StaticResource ImageInfoToBitmapConverter}}" /> | ||
|
||
<TextBlock Grid.Column="2" | ||
VerticalAlignment="Center" | ||
Text="{x:Bind DisplayName, Mode=OneWay}" /> | ||
|
||
</Grid> | ||
</DataTemplate> | ||
|
||
</UserControl.Resources> | ||
|
||
<Grid> | ||
|
||
<!-- Microsoft.Toolkit.Uwp.UI.Controls is deprecated try use CommunityToolkit.Uwp.Controls.TokenizingTextBox. --> | ||
<controls:TokenizingTextBox ItemsSource="{x:Bind SelectedContacts, Mode=OneWay}" | ||
SuggestedItemTemplate="{StaticResource SuggestContactItemTemplate}" | ||
TextChanged="SuggestBox_TextChanged" | ||
TokenDelimiter=";" | ||
TokenItemAdding="SuggestBox_TokenItemAdding" | ||
TokenItemTemplate="{StaticResource TokenContactItemTemplate}" /> | ||
</Grid> | ||
</UserControl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters