This question is locked. New answers and comments are not allowed.
Hello,
I have a problem with my RSS app. I download the XML RSS feed's asynchronously from the source server.
After downloading the xml and adding items into Collection of List<RssFeedItem> I send whole list as payload via Mediator(MVVM). My image is saved as string in ImageLink property for e.g "http://example.com/1.jpg"
This is the receiving funciton :
I this method I assign the ItemsSource property to my received ObservableRssFeedCollection. And there are two problem:
1. How can I "request" a TileAnimation when the itemssource is assigned?
2. Second question is more complicated.
This is my itemTemplate for DBListBox:
How can I wait for a this collection, that will have all information downloaded( I mean that Image control has downloaded picture from this URI).
E.G Scenario:
Best regards,
Karol
I have a problem with my RSS app. I download the XML RSS feed's asynchronously from the source server.
After downloading the xml and adding items into Collection of List<RssFeedItem> I send whole list as payload via Mediator(MVVM). My image is saved as string in ImageLink property for e.g "http://example.com/1.jpg"
This is the receiving funciton :
private
void
FeedDonwloaded(
object
payload)
{
BusyIndicator.IsRunning =
false
;
FeedListBox.ItemsSource = (ObservableRssFeedCollection) payload;
}
1. How can I "request" a TileAnimation when the itemssource is assigned?
2. Second question is more complicated.
This is my itemTemplate for DBListBox:
<
DataTemplate
x:Key
=
"ListBoxItemTemplate"
>
<
Grid
x:Name
=
"grid"
Width
=
"480"
Height
=
"184"
Opacity
=
"1"
>
<
Grid.Background
>
<
LinearGradientBrush
EndPoint
=
"0.546,0.12"
StartPoint
=
"0.912,1.075"
>
<
GradientStop
Color
=
"#FF018BB0"
Offset
=
"0.015"
/>
<
GradientStop
Color
=
"Transparent"
Offset
=
"0.019"
/>
</
LinearGradientBrush
>
</
Grid.Background
>
<
Image
HorizontalAlignment
=
"Left"
Margin
=
"8,8,0,8"
Width
=
"168"
Source
=
"{Binding ImageLink}"
Stretch
=
"UniformToFill"
/>
<
StackPanel
Margin
=
"192,16,8,40"
>
<
TextBlock
TextWrapping
=
"Wrap"
Text
=
"{Binding Title}"
Foreground
=
"#FF018BB0"
FontFamily
=
"Segoe WP Semibold"
FontSize
=
"24"
Margin
=
"0,0,8,0"
/>
<
Rectangle
Height
=
"11"
>
<
Rectangle.Fill
>
<
LinearGradientBrush
EndPoint
=
"0.5,1"
StartPoint
=
"0.5,0"
>
<
GradientStop
Color
=
"#FF0085FF"
Offset
=
"0"
/>
<
GradientStop
Color
=
"Transparent"
Offset
=
"0.409"
/>
</
LinearGradientBrush
>
</
Rectangle.Fill
>
</
Rectangle
>
</
StackPanel
>
<
TextBlock
TextWrapping
=
"Wrap"
Text
=
"{Binding PublishDate}"
Foreground
=
"#D6000000"
Margin
=
"192,0,4,8"
VerticalAlignment
=
"Bottom"
FontSize
=
"16"
/>
</
Grid
>
</
DataTemplate
>
How can I wait for a this collection, that will have all information downloaded( I mean that Image control has downloaded picture from this URI).
E.G Scenario:
- downloading the RssFeed(xml) from server and adding items into collection,
- sending colection to view using Mediator,
- assign the ItemsSource to sent collection
- Wait for this collection that will have updated all bindings(especially Image control will have a complete picture),
- Set BusyIndicator.IsRunning to false and dispaly collection with tile animation.
Best regards,
Karol