microsoft-metro

Adding buttons to the Windows 8 on-screen keyboard

我的未来我决定 提交于 2020-01-16 07:53:55
问题 The Microsoft 'stocks' app has a row of buttons that are displayed at the top of the keyboard when you search for stocks: (See the buttons just above the keyboard) Is there a way to add these in my own app? 回答1: There is exactly the same question here and a person from Microsoft answered: The keyboard is not extensible. What you see is the bottom AppBar on top of the keyboard in that situation. I think you should subscribe to Windows.UI.ViewManagement.InputPane.GetForCurrentView().Showing

Adding buttons to the Windows 8 on-screen keyboard

大兔子大兔子 提交于 2020-01-16 07:53:13
问题 The Microsoft 'stocks' app has a row of buttons that are displayed at the top of the keyboard when you search for stocks: (See the buttons just above the keyboard) Is there a way to add these in my own app? 回答1: There is exactly the same question here and a person from Microsoft answered: The keyboard is not extensible. What you see is the bottom AppBar on top of the keyboard in that situation. I think you should subscribe to Windows.UI.ViewManagement.InputPane.GetForCurrentView().Showing

Cropping tool after file picker (like the one after you take a picture)

霸气de小男生 提交于 2020-01-15 09:25:41
问题 When you take a picture with the integrated camera, windows 8 automatically starts a cropping tool. You can enable it with this code: CameraCaptureUI cameraUI = new CameraCaptureUI(); cameraUI.PhotoSettings.AllowCropping = true; I need something similar for a picture which is chosen from the file picker. Is there any way to use the same Image-Cropper-Tool in the FilePicker as for the camera or do I have to implement it on my own? 回答1: You need to implement on your own. Check out this awesome

How to efficiently write pixels to the screen with Direct2D

萝らか妹 提交于 2020-01-15 04:01:05
问题 I have a array of pixels (m_pixels) that I want to render to the screen using Direct2D. The array contains 10,000 elements (100 rows of 100 pixels). The code below loops over the pixels and draws them to the screen as 10x10 rectangles. Is there a more efficient way of performing this operation? How can I add a GaussianBlur effect to the pixels/image? m_d2dContext->BeginDraw(); m_d2dContext->Clear(ColorF(0.0f, 0.0f, 0.0f)); // Render m_pixels // m_pixels is updated by the solver directly

Blend For Visual Studio 11 get an error

隐身守侯 提交于 2020-01-14 18:47:30
问题 Installed Windows 8 Consumer Preview Installed Visual Studio 2010 Premium Installed Visual Studio 11 Ultimate Everything installed without any errors. I created a new Windows 8 Metro app using Visual Studio 11 and have no issues viewing xaml in VS 11 designer. If I view it in Blend For Visual Studio 11 a propup with error: The project 'TestApp.csproj' could not be opened. The imported project 'C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v11\Microsoft.Windows.UI.Xaml.CSharp.Targets'

Cookie request header on Windows.Networking.BackgroundTransfer.BackgroundDownloader not working

笑着哭i 提交于 2020-01-14 06:05:14
问题 I am unable to download file with the following code. The server requires the cookie that is retrieved earlier for downloading the file. The request headers that are being sent to server are missing the cookie that is set, when observed in Fiddler2. Is there any reason why the cookie is not sticking to the backgrounddownloader ? Setting any other header like User-Agent , etc not shown here but works fine. Windows.Storage.ApplicationData.current.temporaryFolder.createFileAsync(fileName,

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

Windows 8 UserControl Frame Object Navigation

谁都会走 提交于 2020-01-14 03:33:09
问题 Within a XAML user control, the Frame object is null: this.Frame.Navigate(typeof(FaxPropertiesPage)); How do I navigate between pages with a Windows 8 XAML User Control? I have placed the control within a Callisto Flyout on a XAML page. The search button below must navigate the user to another XAML page. 回答1: There's the nice way and the not-so-nice way: Both of them start with a navigation service: public interface INavigationService { bool CanGoBack { get; } void GoBack(); void GoForward();

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