windows-8

WinRT Projected types documentation

瘦欲@ 提交于 2020-01-14 09:04:16
问题 There is something called projected types in WinRT. For example, in metadata, the IXamlType.UnderlyingType is defined as: TypeName UnderlyingType { get; } However when used in a C# app, it changes as follows: Type UnderlyingType { get; } My question is - is there any documentation regarding the rules, API, attributes used for such mappings? 回答1: That's correct, the language projection built into the CLR maps WinRT types to CLR types automatically. Documentation is hard to come by, especially

WinRT Projected types documentation

让人想犯罪 __ 提交于 2020-01-14 09:03:08
问题 There is something called projected types in WinRT. For example, in metadata, the IXamlType.UnderlyingType is defined as: TypeName UnderlyingType { get; } However when used in a C# app, it changes as follows: Type UnderlyingType { get; } My question is - is there any documentation regarding the rules, API, attributes used for such mappings? 回答1: That's correct, the language projection built into the CLR maps WinRT types to CLR types automatically. Documentation is hard to come by, especially

HTML5 App on Windows 8 which cannot be closed

只愿长相守 提交于 2020-01-14 05:44:10
问题 I want to create a HTML5 Application on a Windows 8 Computer which provides product information for a user in the store. Does anyone know if it is possible to set up the windows 8 in a such away, that the user cannot exit the HTML5 App? 回答1: This isn't possible on Windows 8; the soon to be released Windows 8.1 has a "Kiosk Mode", which seems to be what you are looking for. From Windows 8.1 kiosk mode locks systems to a single app: Generally speaking, kiosk mode is something that’s intended

Refresh data in windows store app

﹥>﹥吖頭↗ 提交于 2020-01-14 03:55:11
问题 Im creating a windows store app that has some webservice calls.Currently i use a button event to make the webservice calls, but i want the app to do this automatically every 5 minutes. The button event is now placed in MainPage.xaml.cs What is the best way to perform this are there any timer event in windows store apps? public async void GetWebServiceDataButton(object sender, RoutedEventArgs e) { ........ ......... Retrieve data from web service } 回答1: It's a bit much code to paste here so I

Can I have a composite shape as a resource in WinRT XAML?

若如初见. 提交于 2020-01-14 03:13:12
问题 I'm developing a Windows 8 Metro-style application and I want to use vector images. As there seems to be no direct support for svg images, I am trying to use a xaml fragment consisting of multiple shapes (a path and some lines) as an image. I would like to have a resource dictionary entry with the composite shape and be able to include it in different pages. Ideally, I would also like to be able to resolve a specific composite shape from a data bound property. From what I've read, the WPF

Binding to InnerHTML in MetroStyle App from Javascript

▼魔方 西西 提交于 2020-01-14 02:45:22
问题 I have a Div Defined as: <div class="article-content" data-win-bind="innerHTML: content"></div> and im binding to it with an object which has content property. now the object i create using external resources and sometimes the content property would has content like this : "some text <iframe width="560" height="315" src="youtubelink" frameborder="0" allowfullscreen></iframe>" this throw exception: Unable to add dynamic content. A script attempted to inject dynamic content, or elements

DataReader result truncated when reading from StreamSocket

人盡茶涼 提交于 2020-01-14 01:40:08
问题 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? 回答1: The abstraction of

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

≡放荡痞女 提交于 2020-01-13 20:24:46
问题 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

Grid view like Windows 8 or Google Play

本小妞迷上赌 提交于 2020-01-13 19:27:11
问题 I'm looking for the source code, or an example, of a gridview. I know that with eclipse i can do something really simple: many squares next to each other. But i want to have something strange and particular like this example: Click here Someone can help me? 回答1: You can use StaggerdGridview from Here Github It Looks Like This 回答2: You can do it through layout nesting. It's basically just like doing your html pages. For example: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns

How to copy a folder in a Windows Store App

好久不见. 提交于 2020-01-13 13:06:52
问题 How do you copy a folder and its contents in Windows Store Apps? I'm writing tests for a Windows Store App. The app does things with files, so a set of known files is needed. Ideally, any developer could run these tests without requiring that they do some manual setup. I assume that means test files would be checked into source control and then copied to the LocalState folder where tests could consume them (copy during ClassInitialize test phase). StorageFile has copy functions. It would be