windows-8

Is there a way to find the PackageFamilyName at runtime?

别来无恙 提交于 2019-12-06 13:49:19
问题 Is there a way to figure out the PackageFamilyName (as appearing in the manifest) in runtime? I looked in /Program Files/WindowsApps and could not find the relevant string there. Could not find any API that would let me do this... Any other ideas are welcome. 回答1: I think what you're looking for is PackageId.FamilyName which is available through the Package.Current.Id.FamilyName property. Source: MSDN Forums 来源: https://stackoverflow.com/questions/15333375/is-there-a-way-to-find-the

DataReader result truncated when reading from StreamSocket

馋奶兔 提交于 2019-12-06 13:45:16
I have the following c# / WinRT code to receive a response from an IMAP command DataReader reader = new DataReader(sock.InputStream); reader.InputStreamOptions = InputStreamOptions.Partial; await reader.LoadAsync(1000000); string data = string.Empty; while(reader.UnconsumedBufferLength > 0){ data += reader.ReadString(reader.UnconsumedBufferLength); } The results are truncated after 8192 bytes. 8192 looks suspiciously like a limit of some kind. How do I get around this? The abstraction of TCP/IP sockets is a stream of bytes, not a stream of messages , as I explain on my blog. So it's perfectly

What is the equivalent of an app.config in a WinRT app?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-06 13:37:40
In windows desktop development (WinForms, WPF), the app.config is a potential place to put things like connection strings or uri's used within the app. This allows the end user to change these settings, application wide, without having to have a developer rebuild and redeploy. Is there a similar concept in WinRT apps? The closest thing I see is there is the local application data: http://msdn.microsoft.com/en-us/library/windows/apps/hh700361.aspx The trouble I am having is that it seems like creating values and setting values in local application data are all done within code. Is there a way

Windows 8 application deployment

人盡茶涼 提交于 2019-12-06 13:27:19
I developed a Windows 8 C# application using Visual Studio Express 2012 RC. I can run it on my pc. However, I want to create an executable so that my friends can also try the application. When I click the .exe file under bin/Release folder it says: This application can only run in the context of an app container. How can i create an app container manually or using Visual Studio 2012? See here . You need a developer license to develop and test Metro style apps prior to certifying and deploying through the store. Visual Studio 2012 will automatically request a developer license when it is run

Run application on startup in Windows 8 C#

风流意气都作罢 提交于 2019-12-06 12:50:00
问题 This code: RegistryKey rKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true); rKey.DeleteValue(Application.ProductName, false); rKey.SetValue(Application.ProductName, Application.ExecutablePath, RegistryValueKind.String); doesn't work on Windows 8. I don't have idea why because on Windows 7 and on Windows XP this solution works. Can you help me? 回答1: In order to set something in the registry you need to run the application as an administrator. To

How to get the text of textbox to textblock in another xaml? c# windows store app

﹥>﹥吖頭↗ 提交于 2019-12-06 12:34:17
Code in my MainPage.xaml <TextBox x:Name="txtBox1" HorizontalAlignment="Left" Margin="376,350,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Height="14" Width="113" Text="{Binding TextBox1Text}"/> Code in my MainPage.xaml.cs public string TextBox1Text { get { return this.txtBox1.Text; } set { this.txtBox1.Text = value; } } Code in my Page2.xaml MainPage main = new MainPage(); protected override void OnNavigatedTo(NavigationEventArgs e) { txtBlock1.Text = main.TextBox1Text; } when i run this there no text that output in my textblock A simpler way to do that is to pass parameters between pages

Win8 C# Metro dispatcher and RPC_E_WRONG_THREAD

醉酒当歌 提交于 2019-12-06 12:20:00
I am trying to build an application using the unofficial Google music api for .net in Windows 8 metro interface. I am loading the whole playlist foreach (GoogleMusicPlaylist p in pls.UserPlaylists) lbPlaylists.Items.Add(p.Title); and it comes up with this error HRESULT: 0x8001010E (RPC_E_WRONG_THREAD)) And I read around the internet and maybe I have to use dispatcher or something I am just generally confused. Use this Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { foreach (GoogleMusicPlaylist p in pls.UserPlaylists) { lbPlaylists.Items.Add(p.Title); } }); 来源: https://stackoverflow

PhoneApplicationService.Current.State equivalent in windows 8

∥☆過路亽.° 提交于 2019-12-06 12:19:25
问题 I am looking for equivalent class in Windows 8.x. API for PhoneApplicationService.Current.State which we found in Windows Phone API. Basically, I am trying to persist simple object data between pages with in session. Or is there any other option in Windows 8 to achieve this? 回答1: I won't recommend using the State, it's much easier to use just IsolatedStorage for preserving data both between sessions and pages as well, to keep is simple. All data should be saved in ApplicationData.Current

MediaCapture Windows 8 Desktop - Photo is Dark

雨燕双飞 提交于 2019-12-06 12:07:46
I am attempting to use the MediaCapture API within a Windows 8 Desktop Application (WinForms .NET 4.5). I am able to take the photo using the API, but the photo comes out very dark. Also, it does not appear that the MediaCapture API is triggering the camera flash automatically as it should. I have tried to set the Brightness, Contracts, WhiteBalance and exposure to automatic per MSDN documentation. Here is the relevant code. _mediaCapture = new MediaCapture(); // init the settings of the capture var settings = new MediaCaptureInitializationSettings(); settings.AudioDeviceId = ""; settings

Dropbox Javascript Datastores API example in Phonegap provides error forbidframing for Windows8 app

微笑、不失礼 提交于 2019-12-06 12:04:05
问题 I have attempted to create a Phonegap app supporting both Android and Windows8 for the Dropbox Javascript Datastores API that makes use of the example provided here: https://github.com/dropbox/cordova-datastores-example When I build and run the Android app, it runs perfectly on the Android tablet. But when I run the app created for Windows8, an error is displayed: The app couldn't navigate to ... because of this error: FORBIDFRAMING . And then nothing happens afterwards. I haven't been able