ByteMarq - wp7 app news and blog
WPF, Silverlight and WP7 App Development
  • Home
  • Apps
  • Rig
  • Motorcycle Racing News
  • Contact Us
Windows Phone Apps

Windows Phone Apps

We build Windows Phone Apps. If you have an idea, suggestion of a feature for one of our existing apps, or just some questions then get in touch.
Keeping it Simple

Keeping it Simple

We don't like being too strict when it comes to software design, but we do believe in KISS and YAGNI principles. Experience has shown that keeping things simple pays dividends as you are virtually guaranteed the original design/requirement will change in some way over the course of a project.
Enjoy life

Enjoy life

Despite being a technology company, you will find links to other industries and sites on this website, why? Well, we have other interests and like to enjoy life. You will work much better if you have a smile on your face. Live life :)

Generic IsolatedStorage Manager

By admin On December 18, 2012 · Leave a Comment

internal class StorageManager where T : class
{
private readonly string _dataKey;

///
/// The StorageManager abstracts the access
/// for Loading and Saving data. It also offers defaultContextCreation.
///

/// IsolatedStorage unique key public StorageManager(string key)
{
_dataKey = key;
}

[...]

Continue Reading →

Windows Phone Performance Links

By admin On October 19, 2012 · Leave a Comment

Windows Phone Performance Analysis (SDK Tool):

http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202932%28v=vs.92%29.aspx

http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff967560%28v=vs.92%29.aspx

Good article about the differences between WPF and Silverlight rendering

http://jmorrill.hjtcentral.com/Home/tabid/428/EntryId/446/Differences-between-WPF-and-Silverlight-Rendering-Stacks.aspx

 

http://blogs.msdn.com/b/dwayneneed/archive/2007/04/26/multithreaded-ui-hostvisual.aspx

http://khason.net/blog/how-to-high-performance-graphics-in-wpf/

 

Continue Reading →

Displaying a TextBlock with multiple formatting, coloring, etc

By admin On October 9, 2012 · Leave a Comment

I needed to add a Summary TextBlock to my app that contained multiple colors in a single TextBlock. This is easily achieved using TextBlock.Inlines, but that is not a DependencyProperty and I wanted to stick to my MVVM pattern. So I decided to use a few small models, converter and an ItemsControl.

I used [...]

Continue Reading →

Forcing binding update on focused element

By admin On October 4, 2012 · Leave a Comment

This has come in very useful on a recent project whereby the View was bound directly to a Model for reasons too verbose to explain here.
I found that a Textbox value was not updating back to the Model if focus remained on that Textbox when the user clicked on a Toolbar Button bound [...]

Continue Reading →

Comparing numeric values

By admin On October 4, 2012 · Leave a Comment

Here is a nice helper class for comparing primitive numeric types using a simple epsilon value.

public static class MathsHelper { private const double Epsilon = 0.0001D;   public static bool AreEqualValues(float v1, float v2) { return Math.Abs(v1 – v2) < Epsilon; }   public static bool AreEqualValues(double v1, double v2) { return Math.Abs(v1 – [...]

Continue Reading →

Sort IList collection

By admin On September 26, 2012 · Leave a Comment

This is the best way I have found to sort an IList collection:

ArrayList.Adapter(targetIList).Sort();

Continue Reading →

Launch WPF Window from Winforms Host with communication

By admin On July 16, 2012 · Leave a Comment

An example of how to launch a WPF window from a Winforms host and enable intercommunication using the excellent EventAggregator from PRISM.

Create a Winforms application. Add a button and label to the Form1. Add WPF Custom Control library to the solution. Add a WPF Window. Reference the WPF project from the Winforms project add [...]

Continue Reading →

Create a Licence Key Web Service using WCF

By admin On June 1, 2012 · Leave a Comment

This guide will get you started with web services using wcf.

1. Create a new project in Visual Studio 2010 of type “WCF Service Library”

2. Add these classes (delete the pre-made ones)

[ServiceContract] public interface ILicenceKeyService { [OperationContract] ClientKeyResponse GetChartClientKey(ClientKeyRequest composite); }   [DataContract] public class ClientKeyRequest { [DataMember] public string CompanyName { get; [...]

Continue Reading →

MVVM friendly way to Execute a Command when Esc or Enter key pressed using Behavior

By admin On May 2, 2012 · Leave a Comment

This very simple little behavior is MVVM safe and allows you to execute a Command and pass a CommandParameter when the Esc or Enter/Return key is pressed on any UIElement. I originally developed this so that I could execute a ICommand on a TextBox when the user pressed those keys, but you could add any [...]

Continue Reading →

Useful C# DeepCopy method

By admin On April 19, 2012 · Leave a Comment

Here is a simple DeepCopy method I use in my projects. To use it I just decorate my objects using the DataContract attribute.

public static T DeepCopy<T>(T obj) { using (var stream = new MemoryStream()) { var serializer = new DataContractSerializer(typeof(T)); serializer.WriteObject(stream, obj); stream.Position = 0; return (T) serializer.ReadObject(stream); } }

Continue Reading →
← Previous Entries
  • Recent Posts

    • Generic IsolatedStorage Manager
    • Windows Phone Performance Links
    • Displaying a TextBlock with multiple formatting, coloring, etc
  • Categories

    • Advertising
    • C#
    • Uncategorized
    • Windows Phone
    • WP7
    • WPF
    • XAML
  • Tags

    #Notebox Behavior C# Inlines MVVM TextBloxk WP7
  • Windows Phone 7 App Ads

    Notebox - Simple, fast and secure note storage.
"wow, love my new #nokia820, #noteboxpro looks great on it :)" — @bytemarq

ByteMarq – wp7 app news and blog

Pages

  • Home
  • Apps
  • Rig
  • Motorcycle Racing News
  • Contact Us

The Latest

  • Generic IsolatedStorage Manager
    internal class StorageManager where T : class { private readonly string […]

More

© 2012 ByteMarq - wp7 app news and blog
Platform by PageLines