microsoft-metro

how to view specific setting page in **winrt** application using C#?

社会主义新天地 提交于 2019-12-04 21:44:24
how to view specific setting page in winrt application using C# from outside button click? In javascript i found like this WinJS.UI.SettingsFlyout.showSettings("About", "/Settings/About.html") But i could not able to find this in c#,I am using callisto for Setting Flyouts I'm using Callisto and C# too, and this is how I solved the problem. void OnCommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args) { var settings = new SettingsCommand("settings", "Settings", new UICommandInvokedHandler(showSettings)); args.Request.ApplicationCommands.Add(settings); var credits =

How to get the first element of a CollectionViewSource?

a 夏天 提交于 2019-12-04 19:59:42
I remember seen some code xaml where can get the first element (like an index x[0]) from a collection. This is my CollectionViewSource from Resources. <CollectionViewSource x:Name="groupedItemsViewSource2" Source="{Binding Posters}" ItemsPath="Posters" /> If I display this in a listbox, it loaded it! <ListBox ItemsSource="{Binding Source={StaticResource groupedItemsViewSource2}}" /> But right now, I just want to get the first element through xaml. Is it possible doing this? I faced similar issue, and what i did was to call MoveCurrentToFirst (in ViewModel) `SelectedIndex =0 (on ListBox in XAML

D8048: cannot compile C file 'openssl\applink.c' with /ZW option

╄→尐↘猪︶ㄣ 提交于 2019-12-04 18:54:15
问题 I am trying to use OpenSSL in my metro application. I created a C++ WinRTComponent and have openssl files under this component However, when I try to compile the project, I got the following error: D8048: cannot compile C file 'openssl\applink.c' with /ZW option Anyone can tell me how should I resolve this problem to get my project to compile? Please let me know if you need any other info to help me. Thanks, 回答1: The error message is exactly what it says it is - VC++ does not support C++/CX

Binding multiple HTML properties using WinJS?

喜夏-厌秋 提交于 2019-12-04 18:45:31
WinJS allows you to bind HTML properties dynamically at run-time, similar to XAML binding. <div id="itemTemplate" data-win-control="WinJS.Binding.Template"...> <h3 data-win-bind="innerText: timestamp"></h3> </div> How if I want to also bind the font color style for <h3> as well, how do I achieve that? Unlike the data-win-options binding which makes use of {key:value,key2:value2} syntax. data-win-binding uses a syntax similar to inline-css styles. Using property:bindingValue;property2:bindingValue2 etc will allow you bind multiple properties to the same HTML control. As an example to answer the

Is there any MasterPage in windows8 development

江枫思渺然 提交于 2019-12-04 18:35:59
I have some pages in the win8 application, most of which have a similar layout, I use Frame.Navigate to switch the pages. Just wonder if there is something like MasterPage in asp.net webform/mvc. Just create a page with the layout you want and then use templates to customize it for particular views. You could have one main view .xaml file and then create a resource dictionary file (for separation purposes) for each different way you use it. Edit: I found someone who made a "Master Page" for wpf. See here . You could do something similar for metro. 来源: https://stackoverflow.com/questions

How to run a Metro-App from PowerShell on Windows 8?

社会主义新天地 提交于 2019-12-04 17:54:34
问题 Related to another question on Superuser, I'm trying to run a Metro based application from the command-line. According to a comment on my superuser question, I could maybe find an answear on a PowerShell command or script. I already tried but found anything on any internet reference about PowerShell and Windows 8... So, there is some specific way/command to call and run a Metro-style application from a PowerShell command on Windows 8? 回答1: There is no direct way to do this but there are a

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

How to capture the screen in a Metro C# app

左心房为你撑大大i 提交于 2019-12-04 16:14:02
Anyone got a snip for grabbing a screenshot of your metro app using C#? Or C++? Or VB? Thanks... No, there is no way for a Metro style app to do this. By design they cannot directly interact with other apps outside of themselves, including capturing screenshots which may include other apps. There also isn't a way for a Metro style app to render Xaml elements to a bitmap so you can't readily implement this for your own app. --Rob More details are found here : MSDN Forum I haven't test this solution but it might work if you try to let your app press the Window Key + PrintScreen and it should put

How to start a MetroApp directly in Snapped mode? [duplicate]

别等时光非礼了梦想. 提交于 2019-12-04 14:26:47
Possible Duplicate: Force WinRT app to snapped view Is it possible to start a MetroApp directly in snapped mode? I want to call another App by Protocol, an the App should open in Snapped mode. The call to the App by Protocol is not a problem, it works fine, but the App opens in Fullscreen or Main-Content Mode. I have'nt found any configuration to say "start on Sidebar". Please Help! As of now the answer is no. Since the snapped mode functionality depends on the user , you cant skip it / restrict it using code , Hope MS might provide this feature in further . As @Hermit Dave mentioned

Metro App, Query Current Apps in Windows Store

青春壹個敷衍的年華 提交于 2019-12-04 14:07:26
How does one query data such as App Icons, Reviews, Stars, Price, etc. from Windows Store in another App? For instance, picture an app called "best drawing tools" with comparisons of 5 popular drawing tool apps, then links to Window Store (Or even better direct install links). The premise of the app "Great Windows Apps" (http://www.greatwindowsapps.com) seems to be the basic functionality I am trying to imitate. I also found MetroStore Scanner http://metrostore.preweb.sk which appears to query the windows store from the web, but I am looking to query from another app. I have been researching