How to use StreamGeometry class on Windows Phone - xaml

I try to draw curve reference to Petzold Book Block
and I try use this in Windows Phone 8. These libraries not support StreamGeometry class in namespace System.Windows.Media.
How to try draw it on WP8? Thanks

StreamGeometry is not supported in Silverlight for Windows Phone. To see the full list of available classes, see this MSDN link.
You will have to find another way of simulating StreamGeometry for your application. You should be able to simply use PathGeometry instead.

Related

Using Portable Class Libraries with Windows 8 / Windows Phone 8 MVVM - Page Navigation

I'm developing an app for both Windows 8 and Windows Phone 8.
I chose to implement a Portable Class Library and share it between those two platforms.
The only problem is that I can't figure out how to handle Page Navigation in the PCL.
I've used as an example the folowing tutorial: using portable class library
Any help will be highly appreciated. Thanks.
The best approach is to create your own abstraction around navigation.
I'd create an interface say INavigationService, and then in your non-PCL assemblies for each platform create an implementation of that interface wrapping the appropriate control (Frame for WinRT and PhoneNavigationFrame for Windows Phone 8).
I'd recommend looking at the source of Caliburn.Micro as it has this similar approach to abstract navigation.
Here is a sample that shows how to do this: Sharing Code: Adding NavigationService

Using Path Animation in Windows 8 using XAML

I would like to animate a UI control (an Image actually) over a Path provided.
It is looking that it is not possible to do it in Windows 8 using XAML although it was possible with .NET 4.5 as far as I could see from the below reference.
http://msdn.microsoft.com/en-us/library/ms746981.aspx
My question is whether there is a work around that I can use to achieve my goal or get closer to it.
WinRT is very similar to Silverlight, so many Silverlight solutions can work in WinRT with minimal or no changes. This sample on CodeProject should give you DoubleAnimationUsingPath with little work.
http://www.codeproject.com/Articles/30819/Animation-Along-a-Path-for-Silverlight

What do I have to do to hook a pen event on Windows 8?

Is that possible to use this example and do the samething to hook a pen event on Windows 8? What do I have to change to make it work?
In Windows 8 you should generally not distinguish between Pen, Touch or Mouse. There is a unified input system called MSPointer and you can check out this sample on MSDN for processing input:
http://msdn.microsoft.com/en-us/library/windows/apps/xaml/JJ150606(v=win.10).aspx
Looking at the article you linked, it seems you might want to capture the pointer? This should be possible with the CapturePointer method:
http://msdn.microsoft.com/en-us/library/windows/apps/xaml/windows.ui.xaml.uielement.capturepointer.aspx

is there something like a hubtile (WP7) in win 8 metro style?

i want to port one of my windows phone 7 apps to the windows 8 metro style plattform.
the problem is, that i need a element like the hubtile which i use from the silverlight toolkit for windows phone.
is there something equal in the windows 8 metro style platform? maybe open source like the silverlight toolkit.
i dont want to add the livetile outside my app, this is easy. i want to have something like hubtile for WP7 for win8. This means a tile which is inside my application.
If I'm right I'm planning to do the same task. I didn't find any reference of a control which performs like a HubTile. Thus, I decided importing the one from the Silverlight Toolkit (for Windows Phone). Luckily it worked almost smoothly, you can see my sample at:
https://github.com/hmadrigal/playground-dotnet/tree/master/MsWinPhone.EmbedFont (tested on Windows 8 RP and Visual Studio 2012 RC)
Kind regards,
Herber
you can work with the live tiles of course and in several ways. You can use badge notifications, toast notifications, and so on.
I'll suggest you to take a look to this documentation.
And also take a look to those two samples: App tiles and badge sample and Push and periodic notifications client-side sample
By the way don't forget to enable the features you need in the package manifest.

How to draw graphics object in windows 8 winRT

How i can draw hand free graphic objects in windows 8, like paint can. I implemented such things in windows phone with Inkpresenter. But in winRT it seems that no such items are present. So i decided to use WritablebitmapEX, but idont know hot to implement this in windows 8. No sample code present in the downloading site. please any one help me to solve this issue.
http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/282a211e-e3bf-4184-8868-40208aa596dd
there is a good quickstart page on the Microsoft Site
http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh974457.aspx