windows-8

Can't output int as result of sizeof()

不问归期 提交于 2019-12-11 13:36:15
问题 I'm lloking to write a program in C++ which will sync two directories for me, and for part of it I need to get the size of an char array. The code I'm using is below #include <iostream> #include <Windows.h> using namespace std; int main() { char binaryPath[MAX_PATH]; GetModuleFileName(NULL, binaryPath, MAX_PATH); int r = sizeof(binaryPath); return 0; } Anyway, that code compiles and runs fine. The problem comes when I try and cout the binaryPath variable. In the main block, after the

What is the event that toggles appbar in javascript Windows 8 Metro Style App?

守給你的承諾、 提交于 2019-12-11 13:35:34
问题 I am looking for the event that toggles the appbar in javascript. So it's basically the "edge-swipe" gesture event on the top/bottom edge of the screen. For example, I want to show a text "edge swiped" on the page when the user swipe the upper or butto edge of the screen, without declaring a app bar in the page. How will I be able to do that? I tried crossslide event and it doesn't seem to be right. 回答1: Cross-slide won't work for you because it's a gesture that can start anywhere. There's no

Remove and add GridRow definitions in C#

点点圈 提交于 2019-12-11 13:11:36
问题 I have a Grid with RowDefinitions defined in XAML that I need to change when going to snapped view in code, and so far I can only figure out how to remove them via: RowDefinitionCollection defs = mainGrid.RowDefinitions; defs.RemoveAt(0); defs.RemoveAt(0); Essentially I need to remove all definitions in snapped view (above code works) but then need to make the first row have a height of 140 and the second be "*" once it goes back into snapped. How would I add definitions with these

Barcode scanner for metro apps [closed]

孤人 提交于 2019-12-11 12:54:18
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I want to develop a metro app for scanning bar-codes. Is there existing default library for bar-code scanning? Please provide me the guidelines and sample apps 回答1: Check out ZXing.Net on CodePlex and NuGet. The CodePlex source code has sample of WinRT app. MainPage.xaml <Grid Background="{StaticResource

Get x:Uid propertry of TextBlock in Metro

谁说我不能喝 提交于 2019-12-11 12:52:19
问题 Is there any way to get x:uid property of control in metro apps. <Button x:Name="ViewPanelButton" Grid.Column="3" Grid.Row="0" x:Uid="s_View" VerticalAlignment="Bottom" Margin="5,0,0,5" HorizontalAlignment="Center" Style="{StaticResource MainPageButtonStyle}" Click="ViewPanelButton_Click" Height="22" Width="Auto" /> I want to get this x:Uid property from code behind. It is property in WPF but not in metro. Is there any way to get this property in metro apps ? 回答1: With regret, I have

Call Native C# from WinJS that's loaded in a WebView

核能气质少年 提交于 2019-12-11 12:14:32
问题 I know it's possible to call native C# from WinJS by creating a Windows Runtime Component and then adding it as a reference to the WinJS app -- but is it possible to do the same thing from the WinJS app when it's loaded inside a WebView ? I've tried it, but it seems the WinJS app inside the WebView is operating in a completely different context or something and isn't finding the symbols, so it crashes and offers to launch a new instance of VS2013 to try and debug. 回答1: You're correct in that

Possible to get network MAC address in .NET Metro app?

感情迁移 提交于 2019-12-11 11:45:18
问题 I have the requirement to get get the MAC address of the network interface in my Metro UI app. As far as I can tell, this is simply not supported in the .NET 4.5 for Metro application API. Am I wrong? 回答1: You are restricted from accessing low-level networking information from a Metro Style application, therefore this is not possible with the stock SDK. This is by design. 回答2: You can't retrieve the MAC Address per say, but you do can retrieve hardware specific information to identify a

Trouble binding selected item in nested Listview

北城以北 提交于 2019-12-11 11:42:27
问题 I currently use a listview nested inside a listview as a way to show a Knockout style tournament graphically, backed up in ViewModel by SectionTreeOne, which contains a List of Lists of objects "TournamentNode". I cannot however get my selected "Tournament Node" to bind when I click on it. <Grid Grid.Row="2"> <ListView ItemsSource="{Binding SectionTreeOne}"> <ListView.ItemsPanel> <ItemsPanelTemplate> <VirtualizingStackPanel Orientation="Horizontal" /> </ItemsPanelTemplate> </ListView

install xna on visual studio 2012 on windows 8

。_饼干妹妹 提交于 2019-12-11 11:37:38
问题 I just installed windows 8 ultimate and visual studio 2012 ultimate on it. Later I download windows phone 8 sdk and installed for on it so that i will get xna game studio 4.0. Now I am able to create all kind of apps except xna game for windows and xbox. That one template is missing. I tried browsing for it and seen is couple of post that Microsoft is discontinuing with XNA? Is is true? I want to create a touch aware windows desktop game for windows 8. Is there any work around? Thanks in

ListView Item Selection Windows Store

寵の児 提交于 2019-12-11 11:36:23
问题 I want a ListView to behave like this: With mouse Input: Left Click -> Item click event handler gets executed, but should not display it as "selected" Right Click -> Item gets selected With touch Input: Single Tap -> equivalent to left click Swipe Down -> equivalent to right click I have played around with various of the events and settings but cant seem to get it to work right. 回答1: In other words, you want your listview to behave like the Windows Start screen? This one was brutal for me to