winrt-xaml

Unknown type 'AppBarButton' in XML namespace - Windows 8 Store App XAML, issues adding app bars

↘锁芯ラ 提交于 2019-12-05 11:28:06
I'm new to developing Windows 8 apps, and am having trouble getting my XAML file to recognise generated code for adding AppBars and CommandBars. I am getting the error "Unknown type [something] in XML namespace" for a number of elements I am trying to add, here is my example below: If I re-open my solution this is temporarily displayed as a warning rather than an error. Also navigating to http://schemas.microsoft.com/winfx/2006/xaml/presentation just produces "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.". This is all default code. my

Where Is DrawingBrush In Windows Metro for XAML

流过昼夜 提交于 2019-12-05 09:51:38
Im writing a Windows Metro XAML based app in C#, and I want to draw grid lines with a brush on my custom grid control. In WPF I would create a DrawingBrush to do the job, but there seems to be no equivalent in Metro ??? Does anyone know if this feature exists under another name, or that you achieve the same result differently ? As an additional note, I do not want to draw lines etc directly on my grid (adding lines to my panel's children collection), It really needs to be done via the background property - i.e a brush. Thanks WinRT-XAML stack is closer to Silverlight - also in its limited

How to show basic HTML Windows8 Metro style TextBlock?

五迷三道 提交于 2019-12-05 08:27:26
I have an html page that only contains <p> , <strong> , <br /> and <a> tags. I want to show this content in a XAML TextBlock in Windows 8. Is there any way to show that content in a TextBlock without losing the structure (e.g. paragraphs)? I don't want to use WebView because WebView can not be transparent. I am developing a open source Windows 8 Metro RSS Reader app and I used HtmlUtilities.ConvertToText You can see the source code implementation here http://metrorssreader.codeplex.com/SourceControl/changeset/view/17913#265003 If you want to do it in XAMl, just add a converter. public sealed

Locked screen in windows 8 WinRT

折月煮酒 提交于 2019-12-05 08:18:00
When my app is running in Windows 8 WINRT can I prevent the OS to go to locked screen/sleep mode? You can use the DisplayRequest class to indicate that you are busy playing back something that requires the display to stay active and un-dimmed. A good how-to article with sample code is available here . Don't use it frivolously, it is quite detrimental to power consumption. Good odds that the Store will reject your app if you use it for no obvious benefit to the user. You cannot prevent OS to go to lock screen/sleep/shut-down etc. If you want your application to run behind the scenes, you may

Saving images locally in windows phone 8.1 universal app

[亡魂溺海] 提交于 2019-12-05 07:27:11
问题 I want to download and save(cache) images locally in windows phone 8.1 universal app. so that if Phone is offline I can show users images(avatars) in ListView. What is the best way of saving images to local storage(should I use local storage or I use sqlite as i am using sqlite to store user's other information)? How can I save (download) images to local store? Thanks! 回答1: There's a great extension by Q42 in their Q42.WinRT framework called ImageExtensions.cs You use it on normal Image

Is it possible to set a subject to the mail app in Windows 8 metro application, if I am using share contract and sharing files?

血红的双手。 提交于 2019-12-05 07:23:36
First of all, I am sharing the content from my windows 8 metro application to another app (for example Mailto app) so: Now I am sharing files to mailto app using share contract and sharing files from my application, I wanted to know if: - Can I set the subject to the mailto app to which I am sharing files as an attachement to that mailto app, if so please let me know how can I do this? If not, please let me know what is the work around? As of now, it's not possible. Windows 8 recently introduced a new API called protocol activation. With Protocol activation, you can launch other windows 8 apps

Metro App Change ListView Selected Item Content Foreground

China☆狼群 提交于 2019-12-05 06:38:59
问题 I have a ListView and modified it's DataTemplate with 2 TextBlocks . The first TextBlock contains a Heading , the second a Sub-Heading . I style the 2 TextBlocks with different colours. Here's an example of the ListViewItem in Normal view. Here's an example of the ListViewItem in Selected view. So my question is how do I change the Foreground colours of the TextBlocks in Selected views? Hoping to do this in the xaml. I've tried setting different brushes, which work for items that haven't

Universal app - Loading combobox' ItemsSource async gives weird behaviour

穿精又带淫゛_ 提交于 2019-12-05 06:11:47
While working on an Universal App (currently only on the WP8.1-side), I've stumbled upon the following weird thing. I've got a ComboBox, the UserControl (located in the WindowsPhone-project) it's in is binded to a VM in the Shared project. Both the ItemsSource and SelectedItem are binded to their respective properties in the VM. When running the application, when you select any item except the first one, it is working perfectly. But, when I select the first item, the string displayed in the ComboBox shows the .ToString() -method of the VM instead... (Btw, it's a simple List<string> , the

Why exposed types must be sealed for WinMD/WinRT components?

别来无恙 提交于 2019-12-05 04:51:20
VS compiler does not allow to create sealed exposed types for WINMD type library. Why is this restriction placed ? (I know about sealed types advantages, my question is with respect to Win RT components). This is an architectural limitation, imposed by COM. Which sits at the core of any WinRT type, they are derived from IUnknown and IInspectable. The problem with COM is that it only supports interface inheritance but not implementation inheritance. Which was a strong COM design goal, implementation inheritance is too fraught with implementation details, including the infamous diamond problem.

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();