windows-runtime

Apply Pointer up/down effect to windows phone 8.1 app

柔情痞子 提交于 2019-12-04 17:36:39
I've migrated my windows phone 8 app to windows phone 8.1 runtime. Apparently the tilt effect is included. How would I add this to a custom control? Thanks, Hence you are targeting rintime, you may look at Windows.UI.Xaml.Media.Animation classes and espestially: PointerDownThemeAnimation and PointerUpThemeAnimation - there are simple examples there. Mostly what you have to do is put those animations into VisualStates and VisualTransitions, simple example can look like this: <Style x:Key="myControl" TargetType="Button"> <Setter Property="Padding" Value="0,0"/> <Setter Property="Template">

Where do I find conceptual documentation for Windows Runtime? [closed]

坚强是说给别人听的谎言 提交于 2019-12-04 17:33:36
I'm trying to learn enough about Windows Runtime to make a recommendation about what it would entail for my employer to port our existing applications to it. I'm having trouble finding documentation that provides a technical overview of how the API works. All my web searches seem to lead me to API reference on MSDN , which is terse to the point of unreadability. It documents the formal signatures of API classes and methods, but seems to assume that the reader already knows how things fit together. The purpose of each method is usually just described as a terse sentence fragment that restates

How to detect when Windows 8 goes to sleep or resumes

狂风中的少年 提交于 2019-12-04 17:21:00
I have an app that keeps a connection alive to a server, however if the user walks away and the tablet goes to sleep, I would like to handle the disconnect gracefully, and I would also like to log back in when the user wakes the tablet. I've tried in my putting the following code in my connection class, but they never get fired. Application.Current.Suspending += this.OnAppSuspending; Application.Current.Resuming += this.OnAppResuming;; For desktop apps, you can use SystemEvents.PowerModeChanged event to know if Windows is going into sleep state. I don't know if this works for the tablets too,

How do you bind a ViewModel to the Windows 8 Settings pane in MvvmCross?

蹲街弑〆低调 提交于 2019-12-04 17:13:07
I've been looking at MvvmCross for cross platform mobile development. Since navigation of views is done by calling ShowViewModel<>(), how would you create the settings pane (which is a user control) in Windows 8 using MvvmCross? MvvmCross provides a general ShowViewModel<T> navigation mechanism which uses a Presenter to display and set the DataContext on View s. Views that are shown this way typically cover the 'whole screen' and benefit from automatically constructed ViewModels using CIRS (see http://slodge.blogspot.co.uk/2013/03/v3-new-viewmodel-lifecycle.html ) However, just because

Compiling C++/CX on the command line

妖精的绣舞 提交于 2019-12-04 17:06:50
I get the linker error fatal error C1107: could not find assembly 'platform.winmd': please specify the assembly search path using /AI or by setting the LIBPATH environment variable when I try to compile a C++/CX program on the command line. The error is the same after I followed the instructions on this page: https://msdn.microsoft.com/en-us/library/dn769142.aspx (to summarize: run cl /ZW /EHsc source.cpp from the Developer Command Prompt for VS2015 ) I also tried running vcvarsall.bat x86 store from the Developer Command Prompt for VS2015 but I still get the same error (the same error also

How to get GridView.Selected Item's Scroll Position in Windows 8 Metro App

感情迁移 提交于 2019-12-04 16:20:32
I am selecting gridview item using code, so I also need my gridview to Scrolls at selected item's position , I tried GridView.ScrollintoPosition() but it is not working . IS there any way to get the Scroll position of SelectedItem so that I can scroll it using scrollViewer1.ScrollToHorizontalOffsetWithAnimation() There are a few aspects here. I think just gridView.ScrollIntoView(gridView.SelectedItem) should work. It's a bit asynchronous, so the code wouldn't immediately see it scrolled, but if you do something like await Task.Delay(100) - you might be able to see the ScrollViewer offset

Windows 8: How to undo & redo ink using built in Inking functionality?

家住魔仙堡 提交于 2019-12-04 16:17:31
I've implemented inking code in my app based on the simplified inking sample by microsoft : http://code.msdn.microsoft.com/windowsapps/Input-simplified-ink-sample-11614bbf/view/SourceCode First I made a class that saves data of an operation (draw/delete/clear) like this: public enum eInkOperation { Draw, Delete, None } public class InkOperation { public InkStroke Stroke { get; set; } //requred for drawing from undo public eInkOperation Operation { get; set; } public InkOperation(InkStroke stroke, eInkOperation inkOperation) { Stroke = stroke.Clone(); //needs to be cloned for AddStroke to work

Creating a Sorted Collection View in WinRT

╄→尐↘猪︶ㄣ 提交于 2019-12-04 16:12:37
问题 Has anyone had a go at creating a view that sorts a collection? The ICollectionView interface is present, and it claims to have the same responsibilities as its WPF / SL counterpart (sorting, paging, filtering), however, unless I have missed something, there are no sort methods / properties on the interface. I would be interested to find out how to take a collection of items then sort them via a view in WinRT. Note, I know I can do this manually, however, I want to see how a sorted collection

Style of MediaElement in Windows 8.1

南笙酒味 提交于 2019-12-04 15:59:17
How can I change style of sample MediaElement : For example how can I change the background. Code: <MediaElement AudioCategory="BackgroundCapableMedia" x:Name="media" MediaEnded="Media_MediaEnded" AutoPlay="True" AreTransportControlsEnabled="True" IsMuted="False" Volume="0.5"/> Actually you can change the colors by overriding the default colors in the App. Note this would apply now for all MediaElement controls with transport controls, but it is possible. In your App.xaml you would provide overrides for these values like this: <Application.Resources> <SolidColorBrush x:Key=

How does the WinRT Chrome app print without triggering the OS's “Print” dialog?

妖精的绣舞 提交于 2019-12-04 15:35:37
How does the WinRT Chrome app print without triggering the OS's "Print" dialog? From what I've seen elsewhere, every WinRT app must go through the Windows Print dialog to print. But when you print a page from the Chrome Metro app, you get the Chrome Print dialog, and the Windows Print dialog is not triggered. I don't think you can. The one browser app that enjoys the privilege of being your WinRT browser also enjoys special privileges not granted to other WinRT apps. For example, you can bet that Chrome is neither a XAML app nor an HTML/JS app. Yet all WinRT apps (except the one browser app)