From 32fc287a28c24ca980f4fe67ccab178c04cd9159 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 29 Mar 2013 14:30:06 +0400 Subject: move message list markup to MessageList usercontrol --- Juick/App.xaml.cs | 3 +- Juick/Controls/MessageList.xaml | 70 +++++++++++++++++++ Juick/Controls/MessageList.xaml.cs | 22 ++++++ Juick/Juick.csproj | 11 +-- Juick/MainPage.xaml | 135 ++----------------------------------- 5 files changed, 108 insertions(+), 133 deletions(-) create mode 100644 Juick/Controls/MessageList.xaml create mode 100644 Juick/Controls/MessageList.xaml.cs diff --git a/Juick/App.xaml.cs b/Juick/App.xaml.cs index 8a1de0b..194e6fe 100644 --- a/Juick/App.xaml.cs +++ b/Juick/App.xaml.cs @@ -47,7 +47,8 @@ namespace Juick private static RestClient _cl; public static RestClient Client { - get { return _cl ?? (_cl = new RestClient("http://api.juick.com") { UserAgent = "Juick 0.999/Windows Phone " + Environment.OSVersion.Version }); } + get { return _cl ?? (_cl = new RestClient("http://api.juick.com") { + UserAgent = "Juick 0.999/Windows Phone " + Environment.OSVersion.Version }); } } /// diff --git a/Juick/Controls/MessageList.xaml b/Juick/Controls/MessageList.xaml new file mode 100644 index 0000000..7a5882f --- /dev/null +++ b/Juick/Controls/MessageList.xaml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Juick/Controls/MessageList.xaml.cs b/Juick/Controls/MessageList.xaml.cs new file mode 100644 index 0000000..0b74705 --- /dev/null +++ b/Juick/Controls/MessageList.xaml.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Animation; +using System.Windows.Shapes; + +namespace Juick.Controls +{ + public partial class MessageList : UserControl + { + public MessageList() + { + InitializeComponent(); + } + } +} diff --git a/Juick/Juick.csproj b/Juick/Juick.csproj index 9dd60ae..8e47876 100644 --- a/Juick/Juick.csproj +++ b/Juick/Juick.csproj @@ -84,6 +84,9 @@ + + MessageList.xaml + LoginView.xaml @@ -107,6 +110,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -115,10 +122,6 @@ Designer MSBuild:Compile - - MSBuild:Compile - Designer - Designer MSBuild:Compile diff --git a/Juick/MainPage.xaml b/Juick/MainPage.xaml index 9df6925..8340a9f 100644 --- a/Juick/MainPage.xaml +++ b/Juick/MainPage.xaml @@ -7,19 +7,15 @@ xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:converters="clr-namespace:Juick.Converters" - xmlns:bindings="clr-namespace:Juick.Classes" xmlns:controls1="clr-namespace:Juick.Controls" + xmlns:bindings="clr-namespace:Juick.Classes" + xmlns:usercontrols="clr-namespace:Juick.Controls" mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="696" - d:DataContext="{d:DesignData SampleData/MainViewModelSampleData.xaml}" FontFamily="{StaticResource PhoneFontFamilyNormal}" FontSize="{StaticResource PhoneFontSizeNormal}" Foreground="{StaticResource PhoneForegroundBrush}" SupportedOrientations="PortraitOrLandscape" Orientation="Portrait" phoneshell:SystemTray.IsVisible="True"> - - - - + @@ -31,132 +27,15 @@ IsVisible="{Binding IsDataLoading}" Text="Loading..." /> - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + -- cgit v1.2.3