summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2013-03-02 20:59:42 +0400
committerGravatar Vitaly Takmazov2013-03-02 20:59:42 +0400
commit6df49ee7c25d739ec6445a13e1aa828a4da41730 (patch)
tree8416a01a02c8dc3a24474e5cb56f1773df3595b0
parentdb8a3673bab9c0d27fbb98332d0c47922d9be209 (diff)
use LowProfileImageLoader also on Attachment
-rw-r--r--Juick/MainPage.xaml4
-rw-r--r--Juick/ThreadView.xaml2
-rw-r--r--Juick/ViewModels/MessageListViewModelBase.cs4
-rw-r--r--Juick/ViewModels/MessageViewModel.cs4
4 files changed, 7 insertions, 7 deletions
diff --git a/Juick/MainPage.xaml b/Juick/MainPage.xaml
index dfa0c4f..013fc34 100644
--- a/Juick/MainPage.xaml
+++ b/Juick/MainPage.xaml
@@ -80,7 +80,7 @@
Foreground="{StaticResource PhoneForegroundBrush}"
Margin="5,0,5,5" VerticalAlignment="Top"
IsReadOnly="True" Text="{Binding MessageText}" />
- <Image Source="{Binding Attachment}" Grid.Row="2" Grid.Column="0" Margin="3" Grid.ColumnSpan="2" />
+ <Image bindings:LowProfileImageLoader.UriSource="{Binding Attachment}" Grid.Row="2" Grid.Column="0" Margin="3" Grid.ColumnSpan="2" />
<TextBlock Text="{Binding Status}" Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2"
Foreground="{StaticResource PhoneForegroundBrush}"
Style="{StaticResource PhoneTextAccentStyle}"
@@ -134,7 +134,7 @@
Foreground="{StaticResource PhoneForegroundBrush}"
Margin="5,0,5,5" VerticalAlignment="Top"
IsReadOnly="True" Text="{Binding MessageText}" />
- <Image Source="{Binding Attachment}" Grid.Row="2" Grid.Column="0" Margin="3" Grid.ColumnSpan="2" />
+ <Image bindings:LowProfileImageLoader.UriSource="{Binding Attachment}" Grid.Row="2" Grid.Column="0" Margin="3" Grid.ColumnSpan="2" />
<TextBlock Text="{Binding Status}" Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2"
Foreground="{StaticResource PhoneForegroundBrush}"
Style="{StaticResource PhoneTextAccentStyle}"
diff --git a/Juick/ThreadView.xaml b/Juick/ThreadView.xaml
index c83fed0..efab81a 100644
--- a/Juick/ThreadView.xaml
+++ b/Juick/ThreadView.xaml
@@ -61,7 +61,7 @@
Margin="5,0,5,5" VerticalAlignment="Top"
TextWrapping="Wrap" HorizontalAlignment="Left"
IsReadOnly="True" Text="{Binding MessageText}" />
- <Image Source="{Binding Attachment}" Grid.Row="2" Grid.Column="0" Margin="3" Grid.ColumnSpan="2" />
+ <Image bindings:LowProfileImageLoader.UriSource="{Binding Attachment}" Grid.Row="2" Grid.Column="0" Margin="3" Grid.ColumnSpan="2" />
<!-- TextBlock Text="{Binding Status}" Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2"
Foreground="{StaticResource PhoneForegroundBrush}"
Style="{StaticResource PhoneTextAccentStyle}"
diff --git a/Juick/ViewModels/MessageListViewModelBase.cs b/Juick/ViewModels/MessageListViewModelBase.cs
index f49ef4f..3eb1842 100644
--- a/Juick/ViewModels/MessageListViewModelBase.cs
+++ b/Juick/ViewModels/MessageListViewModelBase.cs
@@ -96,11 +96,11 @@ namespace Juick.ViewModels
Status = status,
AvatarUri = new Uri(string.Format("http://i.juick.com/as/{0}.png", post.User.Uid), UriKind.Absolute)
};
- Items.Add(item);
if (post.Photo != null)
{
- item.Attachment = new BitmapImage { UriSource = new Uri(post.Photo.Small, UriKind.Absolute) };
+ item.Attachment = new Uri(post.Photo.Small, UriKind.Absolute) ;
}
+ Items.Add(item);
}
}
diff --git a/Juick/ViewModels/MessageViewModel.cs b/Juick/ViewModels/MessageViewModel.cs
index 08cdcaa..750864a 100644
--- a/Juick/ViewModels/MessageViewModel.cs
+++ b/Juick/ViewModels/MessageViewModel.cs
@@ -102,8 +102,8 @@ namespace Juick.ViewModels
}
}
- private BitmapImage _attach;
- public BitmapImage Attachment
+ private Uri _attach;
+ public Uri Attachment
{
get { return _attach; }
set