winrt-xaml

Global MediaElement that continues playing after navigating to other page

邮差的信 提交于 2019-11-30 07:39:18
I am using a MediaElement to play music in my metro app. I want the Music keeps playing even if I navigate to another Page. In the following Thread that question was asked also: http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/241ba3b4-3e2a-4f9b-a704-87c7b1be7988/ I did what JimMan suggested 1) In App.xaml.cs Changed the control template of the root frame to include the MediaElement var rootFrame = new Frame(); rootFrame.Style = Resources["RootFrameStyle"] as Style; rootFrame.Navigate(typeof(HomePage), MainViewModel.Instance); Window.Current.Content = rootFrame; Window

Windows RT and c#

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-30 06:59:41
问题 I need to develop Metro style application using C# and XAML which has to work on Windows RT devices and full Windows 8 OS. So I'm allowed to use only WinRT without any .net framework assemblies. I've read this question Microsoft Surface Tablet: Writing Apps for Both Devices? and this very usefull post: http://blogs.msdn.com/b/jasonz/archive/2012/06/12/what-you-need-to-know-about-developing-for-windows-on-arm-woa.aspx, but i stil have question: When i even create a Blank Metro Style

How to override ContentControlThemeFontFamily

怎甘沉沦 提交于 2019-11-30 05:35:43
问题 is it possible to set a custom font for ContentControlThemeFontFamily in WinRt Applications in the standardstyles.xaml? do you have any example? 回答1: Create a resource dictionary of your own and override the themes. <ResourceDictionary.ThemeDictionaries> <ResourceDictionary x:Key="Default"> <FontFamily x:Key="ContentControlThemeFontFamily">Times new roman</FontFamily> </ResourceDictionary> </ResourceDictionary.ThemeDictionaries> 来源: https://stackoverflow.com/questions/12227669/how-to-override

How can I tell which HubSection is selected

[亡魂溺海] 提交于 2019-11-30 05:30:45
问题 I need to change the contents of an AppBar when a user changes the view in a Hub control. The way I did it while using a Pivot control is listening to the SelectionChanged event and responding to the SelectIndex value. The hub, however, only has a SectionsInViewChanged event, which returns a collection of multiple sections. Usually the one user is interacting with and then the adjacent, barely-visible section. So my question is, how can I tell which Section is the one that is currently being

ListViewItem IsSelected Binding - Works for WPF, but not for WinRT

徘徊边缘 提交于 2019-11-30 04:14:14
I'm trying to bind the IsSelected property of a ListViewItem to a property in a ViewModel. It works fine in WPF, but in Windows RT the IsSelected property is never getting set. public class Item : INotifyPropertyChanged { private readonly string name; private bool isSelected; public event PropertyChangedEventHandler PropertyChanged; public bool IsSelected { get { return isSelected; } set { isSelected = value; RaisePropertyChanged("IsSelected"); } } public string Name { get { return name; } } public Item(string name) { this.name = name; } protected void RaisePropertyChanged(string propertyName)

Should I add my Metro app's TemporaryKey.pfx file to version control?

 ̄綄美尐妖づ 提交于 2019-11-30 02:41:07
I've created a Metro-style C#/XAML application, and now I'm trying to add it to version control (Git and, later, GitHub). That means figuring out which files belong in version control and which don't. When I created my Metro project, Visual Studio added a file to it called ProjectName _TemporaryKey.pfx. From what I've read, .pfx files apparently have something to do with code signing or certificates or something like that. I haven't found anything yet that explains exactly what they mean in the context of Metro-style apps, or how you're supposed to manage them. I'm planning to push my code to

Handling Swipe Guesture in Windows 8 Grid

旧时模样 提交于 2019-11-30 00:45:02
I am trying to implement a custom control which consists of a grid with some canvas elements as children , When a swipe action is made on the grid , I am intended to preform some operation with the canvas elements . I am unable to handle the swipe for the grid , i have posted the same in the msdn - win8 Dev forum I was in the same boat as you guys, since there was no samples out there on how this was done, but after perusing and scrutinizing the MSDN documentation on how a swipe gesture is implemented on a Windows 8 Store app using C#, this is what i came up with (and it works for my app which

How to access xaml Control inside DataTemplate inside FlipView

断了今生、忘了曾经 提交于 2019-11-29 23:32:53
问题 I want to access the "image" element in the C# code. I know that i cannot access it directly since it is in datatemplate. I have tried visual trees but still not able to get "image" control element in the code . <FlipView x:Name="flipView" AutomationProperties.AutomationId="ItemsFlipView" AutomationProperties.Name="Item Details" TabIndex="1" Grid.RowSpan="2" ItemsSource="{Binding Source={StaticResource itemsViewSource}}" SelectionChanged="flipView_SelectionChanged"> <FlipView

In WinRT C# how do I save an offscreen XAML tree using RenderTargetBitmap?

ε祈祈猫儿з 提交于 2019-11-29 21:02:20
问题 The following code throws a cryptic System.ArgumentException from the RenderAsync method "Value does not fall within the expected range." If on the other hand my Canvas is part of a visible XAML tree it works. Is it impossible to render some XAML that isn't displayed on screen? Canvas c = new Canvas(); c.Width = 40; c.Height = 40; c.Background = new SolidColorBrush(Color.FromArgb(0xff, 0x80, 0xff, 0x80)); RenderTargetBitmap x = new RenderTargetBitmap(); await x.RenderAsync(c); I almost

How to install a Windows 8 App Without Submitting to Store [closed]

不羁岁月 提交于 2019-11-29 19:59:16
For a customer I need a to present our Windows 8 Metro App. When I deploy my solution or project, I get a exe but I can't install it. I get a MessageError, that I can only start the exe in a app container. How can I create a version of my application to give it to my customer without loading it up to the Microsoft Store? Use the PowerShell cmdlet add-appxpackage . For example: add-appxpackage C:\myapp.appx See http://blogs.msdn.com/b/uk_faculty_connection/archive/2012/04/03/installing-enterprise-metro-apps-without-using-microsoft-store.aspx for more info. 来源: https://stackoverflow.com