New Helper for Downloading from the web #3885
Replies: 26 comments
-
Hi @Vijay-Nirmal thank you for the suggestion. To gauge wider interest, can you please create a uservoice entry with as much detail as possible ? |
Beta Was this translation helpful? Give feedback.
-
I have created UserVoice @hermitdave Give a search in StackOverflow. You can see many people trying to use Downloader. |
Beta Was this translation helpful? Give feedback.
-
Hey @Vijay-Nirmal, what benefits would this helper provide over the BackgroundDownloader? |
Beta Was this translation helpful? Give feedback.
-
@nmetulev Does <TextBlock Text="{x:Bind downloader.GetSpeed}"/> //To display speed
<ProgressBar Value="{x:Bind downloader.GetPercentage}"/> //To display Progress Bar for downloading This helper should have built in |
Beta Was this translation helpful? Give feedback.
-
So basically a wrapper around DownloadOperation? |
Beta Was this translation helpful? Give feedback.
-
@nmetulev I think so. This helper will help to implement all the basic functions (Like Start, Stop, Pause, get speed, setting the speed limit, downloading multiple files, name and size of the downloading item) very easily. I don't think it will be a duplicate of DownloadOperation |
Beta Was this translation helpful? Give feedback.
-
@Vijay-Nirmal Seems interesting if you can also create a page example that can easily be replicated in any app. |
Beta Was this translation helpful? Give feedback.
-
@Odonno I didn't get your point but sounds good to me :) What do you mean by "page example"? |
Beta Was this translation helpful? Give feedback.
-
@Vijay-Nirmal A page with some UI controls demonstrating the download of a file. And, another question, if it works with Download, can it work with Upload? |
Beta Was this translation helpful? Give feedback.
-
That is a good point. I love to see that. If we do this then we should change the name of the helper :) |
Beta Was this translation helpful? Give feedback.
-
From the design point of view. How can we make it easy to create a ListView like Windows Store? private ObservableCollection<DownloadsItem> DownloadsItemSource = new ObservableCollection<DownloadsItem>();
public class DownloadsItem
{
public BitmapImage Logo { get; set; }
public Downloader downloader { get; set; }
} <Page.Resources>
<converters:BoolToObjectConverter x:Key="BoolToIconConverter" TrueValue="" FalseValue="" />
</Page.Resources>
<ListView ItemsSource="{x:Bind DownloadsItemSource}">
<ListView.ItemTemplate>
<DataTemplate x:DataType="local:DownloadsItem">
<StackPanel Orientation="Horizontal">
<Image Name="DownloadLogo" Source="{x:Bind Logo}"/>
<TextBlock Name="DownloadName" Text="{x:Bind downloader.GetInfo.Name}"/>
<StackPanel>
<TextBlock Name="Downloaded" Text="{x:Bind downloader.Downloaded}"/>
<ProgressBar Name="DownloadProgressBar" Value="{x:Bind GetPercentage}"/>
<TextBlock Name="DownloadSpeed" Text="{x:Bind downloader.GetSpeed}"/>
</StackPanel>
<Button Name="StartPause" FontFamily="Segoe MDL2 Assets" Content="{x:Bind Path=downloader.IsPaused, Converter={StaticResource BoolToBrushConverter}}"/>
<Button Name="Cancel" FontFamily="Segoe MDL2 Assets" Content=""/>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView> This method contains few problems.
|
Beta Was this translation helpful? Give feedback.
-
@Vijay-Nirmal uploading is a very different ball game |
Beta Was this translation helpful? Give feedback.
-
@hermitdave But it will also have the sample controls like start, pause, cancel, ProgressBar |
Beta Was this translation helpful? Give feedback.
-
I am not sure if it's the best solution but we can create a DownloadItem or DownloadItemNotification class which contains a boolean (IsRunning) and an integer value (Percentage, from 0 to 100). These properties should be updated using INotifyPropertyChanged. Of course, you can add Speed as a third notifiable property. |
Beta Was this translation helpful? Give feedback.
-
@Odonno
|
Beta Was this translation helpful? Give feedback.
-
@Vijay-Nirmal Not sure what you mean by "direct", but you can simply use a Command or use x:Bind to stop the Download. |
Beta Was this translation helpful? Give feedback.
-
Is it possible to add Parallel Downloading support like IDM to increase the overall download speed? |
Beta Was this translation helpful? Give feedback.
-
Whats the current status of this issue? |
Beta Was this translation helpful? Give feedback.
-
@Vijay-Nirmal Any update on this? |
Beta Was this translation helpful? Give feedback.
-
@Vijay-Nirmal is this being worked on your end or are we still planning to move with this any further? |
Beta Was this translation helpful? Give feedback.
-
I didn't work on this. If we need to proceed with this feature then I maybe (If I have time) able to work on this. |
Beta Was this translation helpful? Give feedback.
-
@michael-hawker is this something we want to proceed with? |
Beta Was this translation helpful? Give feedback.
-
I did something this years ago, you can use it as a head start. See https://github.com/LanceMcCarthy/UwpProjects Scroll down to DownloadStreamwithProgressAsync https://github.com/LanceMcCarthy/UwpProjects#downloadstreamwithprogressasync-httpclient-extension |
Beta Was this translation helpful? Give feedback.
-
The original discussion seems to have been distracted by talk of uploading and recreating the store app UI for handling multiple concurrent downloads. I suspect downloading individual files is something that is common enough that adding a helper to make this simpler would benefit a large number of developers. They could then add UI or multiple file functionality as necessary. I'm not clear if this should be a purely code-based helper or come with UI. For reference: https://docs.microsoft.com/en-us/samples/microsoft/windows-universal-samples/backgroundtransfer/ |
Beta Was this translation helpful? Give feedback.
-
Thanks @mrlacey. I agree, a simple helper like @LanceMcCarthy provided to aid in downloads would be great. Hooking up UI or anything else can be left to the developer. Though I'm thinking combined with the new MVVM Toolkit too, we could probably have a pretty simple example to demonstrate this too. @Sergio0694 does the Task binding/helpers support progress somehow at all? For more complex UI or helpers beyond that I think are beyond the scope of the original issue. They're probably best left as a separate issue for further discussion (though I'm not sure if the Toolkit would be the best place for that depending on the proposal). |
Beta Was this translation helpful? Give feedback.
-
Moving this to our discussions channel. |
Beta Was this translation helpful? Give feedback.
-
Downloading from the web is a very common thing to do in Apps but it doesn't have any dedicated control for it. So it would be nice to have one.
Feature request for this control:
Downloader.URI(URI)
should set the item to be DownloadDownloader.GetInfo.Name
,Downloader.GetInfo.Size
, ... to get the Info about the item to be DownloadedDownloader.Start
,Downloader.Pause
,Downloader.Stop
Downloader.GetPercentage
to get the download compleated percentage so that it can be used for creatingProgessBar
Downloader.GetSpeed
to get the download speedBeta Was this translation helpful? Give feedback.
All reactions