windows-8

PointerPressed not working on left click

谁都会走 提交于 2019-12-05 10:52:41
问题 Creating Metro (Microsoft UI) app for Windows 8 on WPF+C#, I met difficulty with PointerPressed event on a button. Event doesn't happen when i perform left-click (by mouse), but it happens in case with right-click or tap. So what's wrong with that event? for example <Button x:Name="Somebutton" Width="100" Height="100" PointerPressed="Somebutton_PointerPressed"/> 回答1: The solution is pretty simple: these events have to be handled not through XAML but thorugh AddHandler method. SomeButton

Windows 8 XAML ListView with Header and Item Template columns should have same dynamic width

主宰稳场 提交于 2019-12-05 10:45:44
I am using a Listview with an Itemtemplate and a Headertemplate. Both templates contain 6 Columns. Everything is ok if i set a fixed column width for the templates - like in figure one. But i want to set the width to "Auto" for the items - but then i get figure 2... How to handle this? Is it possible to set the Header Column width with c#? - or any other solution? Figure 1: Figure 2: Code Listview: <ListView x:Name="DayanalyseListView" HorizontalAlignment="Center" VerticalAlignment="Top" ItemTemplate="{StaticResource DataTemplate}" HeaderTemplate="{StaticResource HeaderTemplate}"> </ListView>

Windows 8 XAML multi-column text

独自空忆成欢 提交于 2019-12-05 10:34:34
Is there a way to make columns in a text? I have one big string with the text i have to display, and i have a fixed height of the textblock, and have to make the text display in column. like this image: Thanks! Have you looked in the "common" folder of the default solution templates? IIRC there is a control named something like ColumnTextBlock (or something similar) in there that does this for you. If it isn't in the default template you use, try creating a new grid application and look in there - it gets used in the item detail XAML page. HTH The component is called RichTextColumns which

Windows 8 named pipe creation

一世执手 提交于 2019-12-05 10:28:37
How I can create named pipe in the Windows 8 with AppContainer integrity level? Roman Boiko As Pavel Minaev mentioned in one of comments to some answer , there are no named pipes in WinRT (for Metro applications, for desktop applications pipes are the same as in Windows 7): Named pipes aren't there, for example, nor are memory mapped files. There are sockets (including server sockets), but when connecting to localhost, you can only connect to the same app. You may be interested in the WinRT API , including sockets . Talking about WinRT - you really can't create named pipe. Talking about

WinRT - Display animated GIF in a control

倖福魔咒の 提交于 2019-12-05 10:25:26
I need to display an animated GIF in my metro app, but I can't find any control that allows it. (I tried Image , MediaElement and MediaPlayer from the Player Framework) Is it possible somehow to display an animated GIF? While I haven't checked if it works and it might not work for you due to airspace issues - you could try hosting your gif in a WebView control. It might be a lot easier than the otherwise better solutions proposed by Norbert and Carl. You can achieve this natively by using the BitmapDecoder class in the .NET Framework. I have an example on my blog, that shows how to implement

Chrome browser on Windows 8 desktop: touch support error

流过昼夜 提交于 2019-12-05 10:05:40
Chrome browser (version 23.0.1271.97) on Windows 8 desktop is erroneously recognized as supporting touch events. Actually it is a desktop, that is to say, it doesn't support touch events. See for example Modernizr Touch tests: http://modernizr.github.com/Modernizr/touch.html Did anybody run into this problem? Is there a solution or a workaround? 来源: https://stackoverflow.com/questions/13934987/chrome-browser-on-windows-8-desktop-touch-support-error

how to display data in rows and columns XAML windows 8

非 Y 不嫁゛ 提交于 2019-12-05 09:51:43
In metro style windows 8 application, how can i display the data using xaml similar to this (https://dl.dropbox.com/u/59251888/img.png)image. is it possible using ListBox,ListView,GrdView.. ? Yes, but you need to style it up so that it looks like a datagrid. (Assuming you are developing in XAML based on the tags you've assigned to this question). The trick is to make a data template that uses a Grid with columns with proper widths, alignments etc. I've done something similar - using a ListView. This could be modified to make the backgrounds appear only for cells as opposed to rows - which I

Visual Studio 2012 Web Publish on Windows 8 RTM Fails Browser Launch

半城伤御伤魂 提交于 2019-12-05 08:29:37
I'm developing an ASP.NET MVC 4 site using Visual Studio 2012 Premium on Windows 8 RTM x64. When I right click on the web application and choose Publish, Visual Studio 2012 returns the message: "fail to open url of 'http://.../'. Exception:Class not registered" The publish process seems to work correctly but it fails to launch the browser. This happens every time I try to Publish the site and it happens with Chrome (21.0.1180.79 m) or Firefox (14.0.1). Furthermore, since the site isn't launching post Publish, I do it manually using Ctrl-F5. I'm able to navigate around the site normally, but if

Implementing State handling in windows 8 using MVVM Light

限于喜欢 提交于 2019-12-05 08:27:51
How i can implement state handling (running / resume / Terminate states ) using mvvm light. The major issue i a facing is with Navigation. I am totally uncontrolled with the navigation stack. How i can effectively manage this with MVVM Light. You might be interested in the open source Okra App Framework that is freely available on CodePlex and NuGet (disclaimer: I am the lead developer on this project). This has been designed from the ground up for Windows 8 applications, in particular those that use the MVVM pattern (and you can still use the MVVM Light base classes to define your view-models

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