windows-runtime

How to give a “Empty ListView Message” when there is no data source

只愿长相守 提交于 2019-12-06 01:23:13
问题 My application have a ListView with GridLayout. I am now trying to introduce ListView groups into my application. Say, the data source would usually have Group1, Group2 and Group3. I would like to display all 3 groups all the time regardless there is element in it or not. When there is no element in a group, I want to display a "empty group" message under the group title. I think the default way that WinRT handles it is not to display the empty group and it makes a lot of sense in many

Vs update result in System.TypeLoadException

亡梦爱人 提交于 2019-12-06 01:21:12
I am developping a windows phone 8.1 sdk When I use vs 2013 update 3,the code works and i can run my demo. but,yesterday, I update my vs 2013 to update 4,then throw a System.TypeLoadException code details below: var swapChainPanel = new SwapChainPanel(); Children.Add(swapChainPanel); var res = new CXMapResource("", ""); cxEngine = new CXMapEngine(res); Type CXMapResource is a windows runtime component type written by c++ and it is the first winrt type I load in my code I set a break point before this line,it goes here,and then continue,then crash, output: A first chance exception of type

Getting number of files in StorageFolder

£可爱£侵袭症+ 提交于 2019-12-06 00:48:54
I was working with a Windows Phone 8.1(RT) application, I wanted to know how to get the number of files inside a StorageFolder . I know we can use StorageFolder.GetFilesAsync() and then check the count of this list returned. But since this method takes too long and returns all items is there more efficient method of getting this done? You can get 3 orders of magnitude faster performance if you use Win32 APIs to get the file count, but it only works for your local storage directory (it won't work for brokered locations such as Pictures or Music). For example, given the following C++/CX

No installed components were detected. Element is already the child of another element

北城以北 提交于 2019-12-06 00:45:34
In App.xaml I have added Application Resources with a button as: <Application.Resources> <Button x:Key="MyButton"/> </Application.Resources> In MainPage.xaml.cs , I tried to add this button programatically in my grid. Button btn = (Button)Application.Current.Resources["MyButton"]; myGrid.Children.Add(btn); But it gives error like this: No installed components were detected. Element is already the child of another element. In MainPage.xaml: <Grid x:Name="myGrid" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> </Grid> I don't know what I'm doing wrong. Thanks. You cannot add

MinGW / gcc: The application was unable to start correctly (0xc000007b)

删除回忆录丶 提交于 2019-12-06 00:36:47
问题 I have been using MinGW and the GNU Fortran compiler for a while in order to compile Fortran programs on Windows, which has always been a successful method. However, I have been getting the following error for the past 4 days: The application was unable to start correctly (0xc000007b). Click OK to close the application. The error only happens when running applications that I wrote myself, and that I compiled using the MinGW/gfortran combo. When compiling using Visual Studio and iFort, I have

Is it possible to share data between users in a Windows Store App?

↘锁芯ラ 提交于 2019-12-05 23:50:27
I'm pretty sure that I know the answer to this question (A big fat NO), but is it possible to share downloaded data between the same application but multiple users (Windows login, not Microsoft Store users) in a Windows Runtime environment? The local data folder is relative to each login user, so this seems impossible at first glance. It would be a huge waste for each user to have to download all of the content for the application since it is between 700MB - 1GB of content per app. This accepted answer is outdated. It is now possible to share data between users of a given app in Windows 10, by

Can I use my existing .Net 4.0 Class Libraries on WinRT Metro Style Applications for Windows 8

☆樱花仙子☆ 提交于 2019-12-05 23:50:24
问题 I just started diving into Metro Style application development and I realized that there is no framework targeted when I look at the properties of the application. So, can I use my existing .Net 4.0 Class Libraries (or previous ones) on WinRT Metro Stype Applications for Windows 8? For example, I would like to get the Autofac and use it but I am not sure if it would be a right fit. Edit I think it is actually targeting .Net Framework Core 4.5. 回答1: Whilst a number of WinRT APIs are quite

TLS client certificate authentication on UWP Windows Store app

此生再无相见时 提交于 2019-12-05 22:57:15
I'm trying to connect to a server that uses TLS with client certificate authentication. Below is a code snippet: async Task TestClientCertAuth() { int iWinInetError = 0; Uri theUri = new Uri("http://xxx-xxx"); try { using (HttpBaseProtocolFilter baseProtocolFilter = new HttpBaseProtocolFilter()) { // Task<Certificate> GetClientCertificate() displays a UI with all available // certificates with and returns the user selecter certificate. An // oversimplified implementation is included for completeness. baseProtocolFilter.ClientCertificate = await GetClientCertificate(); baseProtocolFilter

Network checking in WinRT(C# implementation)

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-05 21:54:59
How we can check the status of network in windows 8 metro application. ie the availability of different networks(3g,4g, wifi etc) Rakesh R Nair Try this method , I think this is the simplest form of checking network availability in windows 8. http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/d8e76732-19d3-47b3-840f-70d87c75ce9f I think this sample download help you.... 来源: https://stackoverflow.com/questions/11797133/network-checking-in-winrtc-implementation

How to animate TextBlock when its value changes in WinRT XAML?

自作多情 提交于 2019-12-05 21:43:20
I have the following Storyboard <Storyboard x:Name="DeleteStoryboard"> <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="StatusTextBlock"> <EasingDoubleKeyFrame KeyTime="0" Value="1"/> <EasingDoubleKeyFrame KeyTime="0:0:4" Value="1"/> <EasingDoubleKeyFrame KeyTime="0:0:5" Value="0"/> </DoubleAnimationUsingKeyFrames> </Storyboard> and the following TextBlock <TextBlock x:Name="StatusTextBlock" Text="{Binding Status}"> Both are in SettingsFlyout not a Page . I want the Storyboard to start when the TextBlock value changes. I'm using MVVM, so