DCSIMG
Tips & Tricks,Silverlight - Essential XAML

Browse by Tags

All Tags » Tips & Tricks » Silverlight (RSS)

Running on Windows Phone 7 Emulator or real Device by Tomer Shamam

In one of the labs I’m writing for the Windows Phone Training Kit I’m using kind of GPS Emulator for simulating a geographic location (Latitude, Longitude). This simulator comes in handy when writing location aware application, and you don’t really have a GPS on the emulator. So instead of using C# pragmas for picking the correct path, knowing whether the application is running on a real device or not, there is an easy static property for checking that: if (Microsoft.Devices. Environment .DeviceType...

Saving and Loading Captured Image To and From WP7 Isolated Storage by Tomer Shamam

If you read my previous post about WP7, explaining how to use launchers and choosers, you may wonder how to capture an image using the phone camera, then saving it to the phone’s isolated storage. While it is easy to capture an image, it’s trickier to save it to the isolated storage. To capture an image you should do this: public partial class MainPage : PhoneApplicationPage { private byte [] _imageBytes; private void buttonCapture_Click( object sender, RoutedEventArgs e) { ShowCameraCaptureTask...

<howto>Know that you're in design time mode</howto> by Tomer Shamam

When you write markup extensions, or any other control that may work differently at runtime then design time, you may want to check if you’re in design time to pick the correct logic. In WPF, you can call the DesignerProperties.GetIsInDesignMode   attached property. In Silverlight, you may use the HtmlPage.IsEnabled property. This will work from both Blend and Cider designers. Example: if ( DesignerProperties .GetIsInDesignMode(textBox) {    return "In Design Time Mode" ;...
Powered by Community Server (Commercial Edition), by Telligent Systems