pixelsense

How to avoid a System.Runtime.InteropServices.COMException?

◇◆丶佛笑我妖孽 提交于 2019-12-17 06:13:11
问题 In my Microsoft Surface project, I always get a lot of the following exceptions: 'MuReSe.vshost.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll' 'MuReSe.vshost.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.HostingProcess.Utilities\10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.HostingProcess.Utilities.dll' 'MuReSe.vshost.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC

Setting content of a ScatterViewItem depending on the size

落爺英雄遲暮 提交于 2019-12-14 02:53:36
问题 I registered a SizeChangedHandler on my ScatterViewItem: private void MethodBoxScatterSizeChanged(object sender, SizeChangedEventArgs args) { if (args.NewSize.Width < 150 && args.NewSize.Height < 150) { ScatterViewItem svi = sender as ScatterViewItem; TextBox txt = new TextBox(); txt.Text = "Test"; txt.Tag = svi.Content; svi.Content = txt; args.Handled = true; } else if (args.PreviousSize.Width < 150 && args.PreviousSize.Height < 150 && args.NewSize.Height > 150 && args.NewSize.Width > 150) {

Surface SDK only for surface

☆樱花仙子☆ 提交于 2019-12-13 12:40:20
问题 This might be a stupid question, but I couldn't find the answer anywhere. Does the Microsoft Surface SDK 2.0 only work with Microsoft Surface products, or can I use it with other touchscreens? I really just like the way the SurfaceTextBox control works (popping up a onscreen keyboard when clicked) and was wondering if I could use it in a program I'm making (which uses a Elo touchscreen monitor, not multi-touch). Edit Thanks for the responses. I downloaded and installed the SDK 2.0 and tried

Small drag drop prob (probably really simple)

邮差的信 提交于 2019-12-13 05:22:05
问题 I'm dragging an item from a surfacelistbox over something else, let's say for example it's a normal wpf grid - how can I tell where (i.e. what column/row) the item has been dropped on? Thanks a lot, Dan 回答1: Put a Panel inside each cell of your Grid. The drop target will then be one of those panels 来源: https://stackoverflow.com/questions/8520939/small-drag-drop-prob-probably-really-simple

How to use AvalonEdit in Microsoft Surface application?

杀马特。学长 韩版系。学妹 提交于 2019-12-13 02:35:28
问题 I'm using AvalonEdit in a Microsoft Surface application. It's working great, but I have one problem with folding. There are this small + icons to enable folding. But I don't know how I can register the appropriate contact handlers. Any hints how to do that? 回答1: I'm not sure what you mean by "contact handlers". But you have to supply a folding strategy class based on AbstractFoldingStrategy. However folding strategy to go with most commonly used braces is not in the default AvalonEditor

Fail to run an app developed on desktop (Visual Studio 2015) on usb-connected “Surface 3”

会有一股神秘感。 提交于 2019-12-12 04:30:17
问题 I want to develop an application in Visual Studio 2015 on my desktop and run/test it on my Surface 3. I created a Blank application (Universal Windows) and I can run it on “local machine” but when trying to run it on “Device” I get the following error Error DEP6200 : Bootstrapping failed. Device cannot be found. 0x89731810: Deployment failed because no Windows Phone was detected. Make sure a phone is connected and powered on. App1 Both are running Windows 10 version 1511 (Build 10586.164).

ScatterView runtime exception on x64

此生再无相见时 提交于 2019-12-11 10:05:11
问题 I have the same issue as described here. We have developed several applications using the old Microsoft Surface 2.0 SDK. The applications are built as AnyCPU and those work perfectly fine running both in 32 bit and 64 bit mode. In one of these application I use a ScatterView . <Window x:Class="WpfApplication1.MainWindow" 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"

Using Microsoft Surface controls in Expression Blend

五迷三道 提交于 2019-12-11 08:09:41
问题 This seems like it should be a simple thing, but I can't work it out; how do I get Microsoft Surface controls into Expression Blend so I can retemplate them? I have the surface SDK DLLs as references in a new Expression Blend WPF project, but the controls are not available in the 'Assets' dialog, nor can they be added to the XAML directly... Cheers, rJ 回答1: I haven't worked with Surface, but from what I've read they should just show up. They might not be readily apparent in the Assets tab,

SurfaceScrollViewer: getting touch on nested children

自作多情 提交于 2019-12-11 02:48:09
问题 I have the following piece of code, which is part of a WPF 4 UserControl: <Popup x:Name="CantoPopup" IsOpen="False" PlacementRectangle="50,-100,500,120" AllowsTransparency="True" PopupAnimation="Fade" StaysOpen="True" Width="500" Height="120"> <Border BorderBrush="#FF120403" BorderThickness="1" CornerRadius="10" Background="#FF9350"> <s:SurfaceScrollViewer x:Name="IndexScroller" Width="500" Height="120" Margin="10" VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Visible"

Using WPF expander control on microsoft surface platform

限于喜欢 提交于 2019-12-10 23:03:24
问题 I am trying to use the Expander control in the surface application. I have seen its not a surface control so application compiles and control shows up but the contacts are not working. Is there anyway I can modify the contact events and make it work in surface applications. 回答1: To do that, all you have to do is change the Expander 's template to use Surface controls instead of the regular controls. The Expander 's default template can be found at http://msdn.microsoft.com/en-us/library