microsoft-metro

Change Caret Color in WinRT?

假装没事ソ 提交于 2019-12-08 01:54:23
问题 So in WPF and Silverlight you could set the caret color for TextBox using TextBox.CaretBrush, but in WinRT it seems in all their wisdom they removed this property. So now if the TextBox is a dark color, since it defaults the caret color to black you can't see it, and if the background color of your TextBox is black the caret ceases to exist completely. I find this completely illogical, there has got to be a way to change the caret color, either pragmatically or something? Does anyone have any

Win8 C# Metro dispatcher and RPC_E_WRONG_THREAD

末鹿安然 提交于 2019-12-08 01:50:55
问题 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. 回答1: Use this Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { foreach

How to share Windows 8 WinRT Metro style libaries/components across apps

▼魔方 西西 提交于 2019-12-08 01:36:52
问题 The Metro documentation states that the applications are self-consistent (no shared DLL’s, etc), So I’m just wondering how you can create a modular, BIG Metro application by creating reusable components/libraries. Considering the case for HTML5/JavaScript Metro apps, if a lot of them should contain the same CSS and JavaScript (consider jQuery, templates) or WinJS scripts then it doesn't look quite good … I expected some form of libraries/reuse to exist from the start. The HDD space is

Force showing keyboard in metro?

人走茶凉 提交于 2019-12-08 01:22:11
问题 I'd like to be able to force the keyboard to show on screen in my Metro app. My goal is to test out different layouts/controls and get a feel for the interaction. My problem is that I'm running Win8 on a MacBook Pro (Parallels) and I don't know how to override the physical keyboard and show it on screen instead. Similarly, I'd like to be able to force rotation if possible. 回答1: You could run your app the Simulator. You can put the Simulator in "Touch Mode" and that will interpret mouse clicks

API Failure Sqlite

好久不见. 提交于 2019-12-07 22:01:39
问题 I ran the Windows 8 App Certification Kit on my app and it says it will fail because of Sqllite. Am I referencing code incorrectly or can I ignore this problem? Here is the response: Impact if not fixed: Using an API that is not part of the Windows SDK for Windows Store apps violates the Windows Store certification requirements. API __CppXcptFilter in msvcr110.dll is not supported for this application type. sqlite3.dll calls this API. API __clean_type_info_names_internal in msvcr110.dll is

XamlParseException when I inherit a Page from a Generic base class

Deadly 提交于 2019-12-07 20:43:08
问题 I'm currently working with this exact code: public class ViewModelAwarePage<T> : Page { } public class BaseMainMenuView : ViewModelAwarePage<String> { } public sealed partial class MainMenuView : BaseMainMenuView { public MainMenuView() { this.InitializeComponent(); } } And xaml: <local:BaseMainMenuView x:Name="pageRoot" x:Class="Tutorial.UI.WinRT.Views.MainMenuView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns

How to download a webpage in MetroStyle app (WinRT) and C#

依然范特西╮ 提交于 2019-12-07 19:16:46
问题 I'm creating a MetroStyle app and I want to use a website API that is based on the HTTP Get methods. For instance to login I should download the XML returned by this URL: websitehost.com/api/login.php?u=username&p=password The problem is that the new MetroStyle apps won't let me to use many of the methods I've been using for years in .Net so how can I download the returned XML document and parse it? 回答1: You might be searching for this: public async Task<string> DownloadPageStringAsync(string

Doing localization in visualstatemanager by changing x:uid?

社会主义新天地 提交于 2019-12-07 18:50:28
问题 I am adding localization to my UWP app by adding x:uid tags to all of my elements and using the multilingual toolkit. However I've run into an issue where in one case I change the text itself in the narrow view using the visualstatemanager. How can I do this in a localized app? My first thought would be to change the uid of the element to the new match the new text, I'm not sure it's possible. Here is an example of what I'd like to do, but doesn't work: <textblock x:Name="DescriptionTextBox"

Load File as storagefile from Local drive (resource)

有些话、适合烂在心里 提交于 2019-12-07 18:20:10
问题 I am developing Windows 8 app using C#. Here I am picking the file from my desired Location Using FilePicker, I Know the path of file which I picked from Local drive. I want to use the File as a Storage file. StorageFile Newfile = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync(Path); // Path is file path StorageFile file = await KnownFolders.PicturesLibrary.GetFileAsync(Path); But this is for only where my project located & another one for Load file from

Windows 8 UserControl Frame Object Navigation

落爺英雄遲暮 提交于 2019-12-07 15:51:31
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. 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(); bool Navigate<T>(object parameter = null); bool Navigate(Type source, object parameter = null); void