Commit 3c62247a authored by Margaux Clerc's avatar Margaux Clerc

Add empty message for contactlist

parent 2daa5590
......@@ -167,7 +167,7 @@ namespace Linphone.Model
{
get
{
return _contactsList;
return contactItems;
}
}
......
......@@ -739,4 +739,7 @@ To enjoy the best experience with Linphone WP8, we recommend that you use the SI
<data name="SelectAll.Label" xml:space="preserve">
<value>Select all</value>
</data>
<data name="EmptyContactsList.Text" xml:space="preserve">
<value>No contact in your address book</value>
</data>
</root>
\ No newline at end of file
......@@ -38,6 +38,14 @@
Visibility="Collapsed"
TextChanged="ContactSearchBox_TextChanged" />
<TextBlock
x:Name="EmptyText"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Visibility="Collapsed"
Grid.Row="2"
x:Uid="EmptyContactsList"/>
<ListView x:Name="ContactListView"
Grid.Row="2"
ScrollViewer.IsVerticalRailEnabled="True"
......
......@@ -18,6 +18,7 @@ using Linphone.Model;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml;
namespace Linphone.Views
{
......@@ -33,7 +34,17 @@ namespace Linphone.Views
{
this.InitializeComponent();
groupedContactsCvs.Source = ContactsManager.Instance.GroupsOfContacts;
ContactListView.ItemsSource = ContactsManager.Instance.ContactsList;
if (ContactsManager.Instance.ContactsList.Count == 0)
{
ContactListView.Visibility = Visibility.Collapsed;
EmptyText.Visibility = Visibility.Visible;
}
else
{
ContactListView.Visibility = Visibility.Visible;
EmptyText.Visibility = Visibility.Collapsed;
}
}
private void ContactSearchBox_TextChanged(object sender, TextChangedEventArgs e)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment