windows-runtime

BackgroundDownloader only downloading 5 at once

假装没事ソ 提交于 2019-12-13 04:31:57
问题 I create 1,000 downloads using BackgroundDownloader.CreateDownload , then I queue up 100 of them by doing DownloadOperation.Start . If I watch the traffic in fiddler, only 5 of them at actually send out at once. When one finishes, another is sent out. Is there a way to have more sent out concurrently? 回答1: Yes, there is a limit of 5 downloads at a time within Windows.Networking.BackgroundTransfer . You can extend it to up to 6 downloads at a time if you mark all your downloads as High

WinrtXamlToolkit - Charting : ComException when use of INotifyPropertyChanged

核能气质少年 提交于 2019-12-13 04:29:08
问题 I'm currently using the line chart (from WinRT XAML Toolkit), and I'm facing a problem : everything goes right, but if my (In)DependentValue which is bound to my LineSeries contains a change notification (INotifyPropertyChanged), the toolkit raise a COMException. I used the last version (1.4.1) of the toolkit from Nuget. My XAML code : <toolkitchart:Chart x:Name="AltitudeChart" Height="200"> <toolkitchart:LineSeries IndependentValueBinding="{Binding Distance}" DependentValueBinding="{Binding

How do I set a custom button background for a Metro app for all states

旧时模样 提交于 2019-12-13 04:17:52
问题 I want to use my own bitmaps for my buttons for a Metro style Windows 8 app. I can set the background brush for a button to my own ImageBrush and that works fine, except for the hover and pressed states. I cannot figure out how to set the bitmaps for them. Does anyone know how to do this? Thanks. 回答1: WinRT XAML Toolkit has an ImageButton control that allows to define images for all states if that is what you need. You can also check its default template in Generic.xaml to see how it uses the

Can you bind to the ImageSource property of an ImageBrush with Caliburn.Micro (WinRT)?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-13 04:16:32
问题 I was hoping to use dynamic background images with Caliburn.Micro. This is what I have tried without success. <Grid> <Grid.Background> <ImageBrush x:Name="MyPhoto" /> </Grid.Background> </Grid> //some view model public class ImageViewModel { public ImageSource MyPhoto {get;set;} } //Add Convention //App.XAML.cs ... public override void Configure() { ... ConventionManager.AddElementConvention<ImageBrush>(ImageBrush.ImageSourceProperty, "ImageSource", "Loaded"); ... } Is it possible to bind and

How to create ControlTemplate from code behind in Windows Store App?

只谈情不闲聊 提交于 2019-12-13 04:14:38
问题 UPDATE 1 If ControlTemplate has binding, will XamlReader.Load(...) work ? <ControlTemplate TargetType="charting:LineDataPoint"> <Grid> <ToolTipService.ToolTip> <ContentControl Content="{Binding Value,Converter={StaticResource DateToString},ConverterParameter=TEST}"/> </ToolTipService.ToolTip> <Ellipse Fill="Lime" Stroke="Lime" StrokeThickness="3" /> </Grid> </ControlTemplate> I want to achieve this from code behind. <ControlTemplate> <Ellipse Fill="Green" Stroke="Red" StrokeThickness="3" /> <

Passing UI elements to and from Windows Runtime Component in different environments?

微笑、不失礼 提交于 2019-12-13 03:55:28
问题 I wonder if there is a way to create a runtime component (written in C# for example) which allows working with UI elements from different environments. For example I would like to append an UI element such as MediaElement to a given Panel (C#) or div (Javascript). Can I call a method in a runtime component like this: cmpt.setPlayer((Panel) playerParent); (C#) and cmpt.setPlayer(getElementByClass('.playerParent')); (Javascript). Is this possible somehow? If not (and I would totally understand

System.InvalidOperationException: Specified element is already the logical child of another element. Disconnect it first message on windows 7 machine

血红的双手。 提交于 2019-12-13 02:54:35
问题 I have a WPF application running without any issues in my windows 8 OS development machine. But when i try to run the same in Windows 7 machine i am getting the error System.InvalidOperationException: Specified element is already the logical child of another element. Disconnect it first. The detailed error log is [CDATA[Set property 'System.Windows.FrameworkElement.Style' threw an exception. LoadBaml at offset 481 in file:line:column <filename unknown>:0:0 System.InvalidOperationException:

Are there any class in WinRT as MarketPlaceReviewTask in WP?

蹲街弑〆低调 提交于 2019-12-13 02:47:53
问题 Are there any class in WinRT as MarketPlaceReview or MarketPlaceSearch Tasks in WP? Thanks. 回答1: You can use Windows Store's protocol with specific arguments to launch several tasks related to Store like If you want to open review page for any app then, you can open with this line. await Windows.System.Launcher.LaunchUriAsync(new Uri("ms-windows-store:REVIEW?PFN=MY_PACKAGE_FAMILY_NAME")); If you open the page of particular app in Store app then you can open with this line. await Windows

Using a vector of structs in a struct in c++/cx

一笑奈何 提交于 2019-12-13 02:13:06
问题 I have a header file defining some structs I want to use in my code. public value struct HttpHeader { Platform::String^ mName; Platform::String^ mValue; }; typedef Platform::Collections::Vector<HttpHeader> HttpHeaders; public value struct HttpRequestEvent { Platform::String^ mUri; HttpHeaders^ mHeaders; }; When I build this I get this error: error C3986: 'mHeaders': signature of public member contains native type 'std::equal_to<_Ty>' with [ _Ty=cpcpb::HttpHeader ] (SettingsServiceImpl.cpp)

Local settings in Windows Phone 8.1 app are not stored

牧云@^-^@ 提交于 2019-12-13 02:04:44
问题 I have created many apps for Windows Phone 7 and 8. To store settings I was using these methods: IsolatedStorageSettings.ApplicationSettings["key"] = value; IsolatedStorageSettings.ApplicationSettings.Save(); Everything worked perfectly, my settings were stored. Save() method did the job. But now I am creating an app for Windows Phone 8.1 (WinRT). I have followed this guide to learn hot to save settings. Ane here is how it looks like now: Windows.Storage.ApplicationData.Current.LocalSettings