microsoft-surface

LibraryContainer in a ScatterViewItem: resizing and background rectangle...

Simple one: Want to add a LibraryContainer to a Surface ScatterView. Know I have to add the container inside a ScatterViewItem to get the rotate/move features.. but the SVI adds a rectangle box around the control, and it does not size correctly. Think I'm missing something simple but can't figure it... My current XAML is as follows: ...

WPF: Binding to commands in code behind

Hi, I have an WPF Microsoft Surface Applikation and I'm using MVVM-Pattern. I have some buttons that are created in code behind. And I would like to bind commands to them but I only know how that works in the XAML like this: <Custom:SurfaceButton Command="{Binding SaveReservationCommandBinding, Mode=OneWay}"/> But I cannot do it l...

WPF: Changing the look of a Surface Listbox "click-effect"

Hi, I'm changing the look of some Controls that I use in my Microsoft Surface Application at the moment. And today I'm working on a SurfaceListBox. I have the template for it and already changed background and borders and other stuff. But I really cannot find where I can change the color of the rectangle that appears on the ListBoxItem...

Scale text in a grid/viewbox upon pinching

For a day now I'm struggling to solving this issue, regarding scaling a textblock and a textbox upon pinching the scatterViewItem for resizing it. I've tried putting each of the elements in their viewbox, but also having the whole grid in a viewbox. The issue is that it(the textbloxk, that is) doesn't scale upon pinching or stretching ...

Developing and deploying SurfaceScrollViewer

I'm having a hard time finding the correct information on this. I've been using WPF for my applications because of the enhanced visuals you can achieve with it. Right now my controls are basic WPF controls (ListView, ComboBox, etc.) and are scrolled using the basic Windows methods (Scrollbar, Scroll buttons), which is not touchscreen f...

How to do something like a screensaver in my WPF-Application?

Hi, I have an WPF-Application with 3 different UserControls in the MainWindow and only one of these is visible at the time. It's like having 3 different pages and you able to switch from one page to another when you like it. First page is like a start-screen. Second is like the "general view". And the third page shows details. Switchin...

Navigation in Microsoft Surface

I'm writing an application for Microsoft's Surface table. I need to navigate between screens (Windows or Pages). Does the SurfaceSDK offer anything akin to a NavigationWindow? If not, how can I navigate between screens? ...

WPF Slider layer issue

Hi all, I'm using a WPF slider and have basically used it to implement a "Pull out control". Basically it's a slider control with two positions: 0 and 1 I have this control on the far left side so what you initially see is the thumb position at 0. The user can then drag it out to the 1 position to see the full view of the slider thumb...

saving the inkcanvas

Hi, In my application the user can create multiple objects (so called drawings) each of which has a SurfaceInkCanvas, very similar with the Photopad (the Photo Paint app)in the SDKSamples(provided by MS Surface SP1 SDK). What would be the best way to save the content of the inkCanvas(the drawing object) given the fact that there may b...

surface drop image scatterview to librarystack, trigger event

Hi, I am new in this field and am trying to do a drag and drop from scatterview to librarystack, and when drop is executed, an event should be triggered ( after an image is dropped in the librarystack, a message box will be shown). However, I can not find the way to do it.. Below is the code snippets <Grid> <!-- Drop 1.jpg to libraryst...

How to best disable multitouch on buttons in WPF?

I am working on a Surface application and I have a problem with multiple buttons getting pressed at the same time. I have a menu control with a few buttons. Some of them are bound to Commands that make the hosting window fade out the menu control and run something else, while some are just hooked up to EventTriggers that fade through di...

Why is the Photos app source code not public?

Couldn't find a trace of the source code behind the Photos application that runs on MS Surface by default. If anyone has a link to the source code, could you please also let me know? If it's not only can any MSFT moderators please tell me why? Thanks! ...

Unable to cast object of type 'System.String' to "..Controls.SurfaceListBoxItem' exception

All that i'm trying to do is to compare, for each value in a listbox, its value with a chosen one and then set the match index as selected. For some reason the exception in the title is raised. I don't understand why though. Code: foreach(SurfaceListBoxItem n in BackgroundsList.Items) { if (n.ToString(...

"path" not a valid property for Image.source

I'm trying to change the background image set by xaml this way: <s:SurfaceWindow.Resources> <ImageBrush x:Key="WindowBackground" Stretch="None" Opacity="0.6" ImageSource="pack://application:,,,/Resources/img/bg/Default.jpg"/> </s:SurfaceWindow.Resources> by using the following code in a method: sessionWindow.Se...

Can you please let me know how to drag the item back to the LibraryBar?

Can you please let me know how to drag the item back to the LibraryBar? Ref# http://stackoverflow.com/questions/1632909/using-librarystacks-in-a-scatterview-on-surface ...

Surface WPF ScatterViewItem with DocumentViewer data binding problem

I've got an issue with data-binding with a WPF application I'm working on. Essentially I've got a class document which contains a IDocumentPaginatorSource property containing the contents of an XPS document. In my Main Window I've got a ScatterView which I create ScatterViewItems for programmatically. When a button is pressed, a new Docu...

I used the example gave by microsoft to drag and drop an object from a ScatteredView to a Surface List Box but it is not working

Hi, I developped the example given by Microsoft to drag and drop and object from a scatterview to a surface list box. The scatterview is working, I can move the objects on it. But when I try to drag and drop them on the Surface ListBox nothing happen. I posed a breakpoint on the method OnDragSourcePreviewContactDown but it doesn't ent...

Altering the Center of Rotation of a ScatterViewItem

By default, when manipulating a ScatterViewItem control it will rotate about its own center point. Is there any way to alter this such that the control rotates about another point, for example rotate about its own top left corner? ...

Surface wpf : move an ellipse wherever in the window

Hi, I want to create an ellipse who move unpredictable wherever in the window and know in the same time his postion. Like a ball who are going everywhere in the surface and if his meet a corner he changes his direction. Thanks for your help. Sorry if my explication is not specific ...

Binding ScatterViewItems to files

Hi, I'm developing an application using the Surface Toolkit for Windows 7 beta and stumbled upon this problem: I'm having a ScatterView which should show all files in a folder. Therefore I use a FileSystemWatcher that recognizes adding, deleting and renaming files. For presenting the files I define the ItemTemplate. So far so good. I...