windows-runtime

WinRT and software ClearType font rendering

无人久伴 提交于 2019-12-05 03:35:53
Does WinRT provides an option to fall back to software ClearType font rendering (as Direct2D do via "Direct2D and GDI Interoperability") or we will be stuck with somewhat blurry hardware font anti-aliasing only? No. Windows on ARM will not support ClearType. This is by design. Instead, Windows on ARM tablets will be required to have a high DPI. http://www.istartedsomething.com/20120303/cleartype-takes-a-back-seat-for-windows-8-metro/ 来源: https://stackoverflow.com/questions/7487080/winrt-and-software-cleartype-font-rendering

Metro UI: I'm switching xaml but images not loading

不羁的心 提交于 2019-12-05 03:33:19
问题 I have a multi-xaml metro app. I want to switch between xaml by button click. private void Button_Click_1(object sender, RoutedEventArgs e) { Window.Current.Content = new BlankPage1(); this.InitializeComponent(); } private void Button_Click_2(object sender, RoutedEventArgs e) { Window.Current.Content = new Sudoku.sudoku(); Window.Current.Activate(); } private void Button_Click_3(object sender, RoutedEventArgs e) { TextTwist.text_twist ob= new TextTwist.text_twist(); ob.InitializeComponent();

WinRT - How to ignore or delete page from navigation history

南笙酒味 提交于 2019-12-05 02:57:46
I have following situation in my WinRT metro (c# - xaml) application : User launch the application and he or she is not logged in. In the menu bar I have button which navigates them to Shopping cart. It's important to mention that they can click on it regardless of logged in/out status. So I have this : Home Page - > Login Page - > Shopping Cart And everything works great, but when I try press BACK button on my Shopping Cart page I'm navigated back to Login Page, which make sense, because page is in my navigation history. But I don't want that, I want to return user to Home Page and skip login

Get English exception message instead of local language

喜夏-厌秋 提交于 2019-12-05 02:41:50
On Windows 8 using Visual Studio 2012 RC on a german system, I get all my Exceptions localized to german, which effectively means I can't google anything useful for them. To solve this, I already used the following to change my IDE to english language: Tools --> Options --> Internetional Settings --> Language --> English Nevertheless, I get my exceptions in the localized german language. I tried changing the ThreadUI Culture in code using this code: Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-us"); Sadly, in WinRT the Thread namespace is gone in WinRT. Therefore I tried: System

Debug.Assert(false) does not trigger in win8 Metro apps

女生的网名这么多〃 提交于 2019-12-05 02:38:12
I notice Debug.Assert does not trigger in Metro apps, however, if the project is a traditional one like Console or WinForm, it does trigger. And yes, I am in Debug mode. Is it a setting not properly set in Visual Studio (11 Beta)? Or Debug.Assert is intended to be disabled in metro apps? I know many exceptions are swallowed during the execution of Metro apps, but Debug.Assert is so handy that I can't think of a reason why it should be disabled. It does trigger, look in the Output window. It just doesn't automatically prompt you to ask if you want a debugger break and thus just keeps motoring.

Show flyout using BottomAppBar

血红的双手。 提交于 2019-12-05 02:37:59
I'm trying to show a simple Flyout (with informational content) when a AppBarToggleButton within BottomAppBar is pressed, but my solution doesn't work. :( This is my code: <Page.BottomAppBar> <CommandBar> <AppBarToggleButton x:Uid="MapPageAppBarLegend" Label="" Icon="List"> <FlyoutBase.AttachedFlyout> <Flyout> <TextBlock Text="Informations here..."/> </Flyout> </FlyoutBase.AttachedFlyout> </AppBarToggleButton> </CommandBar> </Page.BottomAppBar> Nothing appears.. Can anyone help me to showing this flayout? Thank you very much and sorry for my english language. :) Pame Everything is quite

Programmly using SSL certificates in Windows 8 app

僤鯓⒐⒋嵵緔 提交于 2019-12-05 01:49:55
问题 I need help with this: Our backend is secured by self-signed certificate. Lets call it: OurMegaCoolCertificate.cer So, we have imported this certificate to our developers machines by using certmgr.msc . And now we can retrieve data from our backend using this code: async public static Task<string> getData(string Id, string Type) { String url = "https://BACKEND/API/?Id=" + Id + "&Type=" + Type; HttpClientHandler aHandler = new HttpClientHandler(); aHandler.ClientCertificateOptions =

Getting a Type Assembly in Windows 8

让人想犯罪 __ 提交于 2019-12-05 01:43:48
I'm trying to use MEF in Windows 8. In order to build up my AssemblyCatalog for the container, I need a reference to the assembly. In the past, I would have just done this: var catalog = new AssemblyCatalog(typeof(App).Assembly); Mysteriously, the Assembly property no longer exists on the Type object. Anybody know of a good work around? Is there another way to get the assembly? I could load it using Assembly.Load , but I would need the name of the assembly. I can't get that from the type either. Is using a DirectoryCatalog a possible alternate? I don't like the idea, but I'll do what I need to

Exception when reading text from the file using FileIO.ReadTextAsync

╄→尐↘猪︶ㄣ 提交于 2019-12-05 01:30:49
I am getting the following exception when attempting to read a locl text file using var text = await FileIO.ReadTextAsync(file); The handle with which this oplock was associated has been closed. The oplock is now broken. (Exception from HRESULT: 0x80070323) This happens in one of the regression unit tests, it also happens from time to time in the app. App is XAML + C# Any ideas what might be causing it?! I was having the same problem, that ocurred by concurrence threading. I was trying to acess the same file in two places at the same time and didn't realize it. Try to verify your code looking

Open links in external browser in WebView (WinRT)

▼魔方 西西 提交于 2019-12-05 00:45:13
I have a WebView component that I use to display HTML Ads in my app. When user clicks an Ad in the WebView I want to open the Ad link in an external browser. How do I do that? I need something like OnNavigating from the WP7 browser. I tried the Tapped event of the WebView but it never gets called even when I set IsTapEnabled=true. I need something like You will need to use the ScriptNotify event for this. Here's how I handled the scenario (using NavigateToString). If you're retrieving the web view content from a URL, you will need be able to modify the HTML for this to work. Add the following