pixelsense

detect long touch (WPF and Microsoft Surface)

前提是你 提交于 2020-01-25 03:48:07
问题 Is there any way I can detect a long touch over a TextBlock (or a Label)? 回答1: There is an event called TouchAndHoldGesture and PreviewTouchHoldGesture 回答2: As far as I know there is no built in way so you would have to do something like this • Capture the start time on the TouchDown event of the control • Compare this to the release time in the TouchUup event • If the two are different by X then run your long touch code There might be a few things you have to code around but that is the

Is a UserControl not in the HitTestResult?

十年热恋 提交于 2020-01-24 12:13:25
问题 I defined a usercontrol: <s:SurfaceUserControl x:Class="Prototype_Concept_1.CodeBox" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="http://schemas.microsoft.com/surface/2008"> <Grid> <Viewbox> <s:SurfaceScrollViewer Margin="10,10,10,10" x:Name="scroll" Width="250" Height="250" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Visible" CanContentScroll="True"> <RichTextBox Name="TextInput"

Is a UserControl not in the HitTestResult?

北城以北 提交于 2020-01-24 12:12:11
问题 I defined a usercontrol: <s:SurfaceUserControl x:Class="Prototype_Concept_1.CodeBox" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="http://schemas.microsoft.com/surface/2008"> <Grid> <Viewbox> <s:SurfaceScrollViewer Margin="10,10,10,10" x:Name="scroll" Width="250" Height="250" VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Visible" CanContentScroll="True"> <RichTextBox Name="TextInput"

Accessing DOM from WebBrowser

我怕爱的太早我们不能终老 提交于 2020-01-20 04:24:25
问题 I am trying to implement a browser-like little application that would allow me to modify the viewed web-sites appearance (e.g. make the font for links bigger). It is designed for Microsoft Surface, to be used on a huge touchscreen. It uses WPF for the UI. I am intending to use a WebBrowser control for this task. However there are two classes called WebBrowser in the docs. One of them is in System.Windows.Forms , the other in System.Windows.Controls . The first one gives access to DOM model,

Using WPF controls in a Surface application

一曲冷凌霜 提交于 2020-01-17 01:21:14
问题 I'm needing a TreeView control in our surface application. Situation is ive already created a TreeView implementation using infragistics XamlDataTree . Im wondering whether this control set can be used in a Surface application (being that it is a WPF app under the hood)? Question also in general can you reuse standard WPF controls in the surface environment? Also is there a tool already in the Surface SDK suite that would suit a TreeView style layout? Thanks in advance 回答1: Don't know about

Rewriting a WPF application to Surface

孤者浪人 提交于 2020-01-14 13:54:06
问题 I'm working on a WPF application, and I'm curious about what it would take to rewrite this application to a Surface application if we want to control it through multitouch some day. Is it likely that we can reuse big parts of our WPF application and transfer it smoothly to Surface, or is Surface completely different, and we probably have to write a completely new GUI for Surface? Or can I actually use WPF applications on Surface? As you maybe can tell I don't really have a clue at all

How can I bind one property to another property, offset by a specific amount?

不问归期 提交于 2020-01-06 14:18:56
问题 I'm trying to bind two points of a line to two Ellipses, which are inside ScatterViewItems. At the moment, I'm able to bind to ActualCenter.X and .Y for the ScatterViewItem, which works, but because the ellipse is not the only element in that ScatterViewItem (there is also a label), it's off-center, such that the line's endpoints are not the center of the ellipse. Ellipse doesn't have an ActualCenter property. I wanted to know whether I'm able to offset a property binding by a fixed amount,

Surface Runtime Exception on Windows 8

吃可爱长大的小学妹 提交于 2020-01-06 07:43:44
问题 We are experiencing a strange problem with a software we already developed few month ago, today we had to reopen the app for the customer to make some improvement. But a strange exception start to show up. it seem that is coming from the ScatterView . But the strange thing the app is working on production and the code is the same what could be the cause? Here the exception. System.TypeInitializationException was unhandled HResult=-2146233036 Message=The type initializer for 'Microsoft.Surface

Surface Runtime Exception on Windows 8

半世苍凉 提交于 2020-01-06 07:43:00
问题 We are experiencing a strange problem with a software we already developed few month ago, today we had to reopen the app for the customer to make some improvement. But a strange exception start to show up. it seem that is coming from the ScatterView . But the strange thing the app is working on production and the code is the same what could be the cause? Here the exception. System.TypeInitializationException was unhandled HResult=-2146233036 Message=The type initializer for 'Microsoft.Surface

How to install Microsoft® Surface® 2.0 SDK without installing Visual Studio

无人久伴 提交于 2020-01-02 08:50:13
问题 I have a kiosk application build on Microsoft® Surface® 2.0 SDK and WPF. The device for deployment is a kiosk and Visual Studio is not installed. When running the application on the kiosk I miss some dlls Microsoft.Surface.Core , so I tried to install Microsoft® Surface® 2.0 SDK but it require VS. Error: You must install Microsoft Visual Studio 2010 or Microsoft Visual C# 2010 express before you install Microsoft Surface 2.0 sdk. I would like to know a work around in order to install SDK