public static bool LoadFromFile(string fileName, out Time obj)
 {
     Exception exception = null;
     return LoadFromFile(fileName, out obj, out exception);
 }
 /// <summary>
 ///   Deserializes xml markup from file into an time object
 /// </summary>
 /// <param name = "fileName">string xml file to load and deserialize</param>
 /// <param name = "obj">Output time object</param>
 /// <param name = "exception">output Exception value if deserialize failed</param>
 /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
 public static bool LoadFromFile(string fileName, out Time obj, out Exception exception)
 {
     exception = null;
     obj = default(Time);
     try
     {
         obj = LoadFromFile(fileName);
         return true;
     }
     catch (Exception ex)
     {
         exception = ex;
         return false;
     }
 }
 /// <summary>
 ///   Deserializes workflow markup into an time object
 /// </summary>
 /// <param name = "xml">string workflow markup to deserialize</param>
 /// <param name = "obj">Output time object</param>
 /// <param name = "exception">output Exception value if deserialize failed</param>
 /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
 public static bool Deserialize(string xml, out Time obj, out Exception exception)
 {
     exception = null;
     obj = default(Time);
     try
     {
         obj = Deserialize(xml);
         return true;
     }
     catch (Exception ex)
     {
         exception = ex;
         return false;
     }
 }
 public static bool Deserialize(string xml, out Time obj)
 {
     Exception exception = null;
     return Deserialize(xml, out obj, out exception);
 }
        /// <summary>
        /// Render the time signature to a Grid
        /// </summary>
        /// <param name="time">The time signature to render</param>
        /// <param name="fontSize">The size of the font currently being used</param>
        /// <returns>Time signature on a grid</returns>
        public static FrameworkElement RenderTimeSignature(Time time, double fontSize)
        {
            double halfFont = fontSize / 2;
            //todo: make proper time signature label
            //todo: measure font size stuff properly
            Panel grid = WPFRendering.CreateAutoSizingGrid();
            Label beatsLabel = WPFRendering.GetMusicalLabel(time.Beats, halfFont);
            grid.Children.Add(beatsLabel);

            Label beatType = WPFRendering.GetMusicalLabel(time.BeatType, halfFont);
            beatType.Margin = new Thickness(0, WPFRendering.GetFontHeight(fontSize / 3, Constants.MusicFonts.DEFAULT), 0, 0);
            grid.Children.Add(beatType);

            //todo: interchangable and other type of time signature, see definition of Time to hunt it down
            grid.VerticalAlignment = VerticalAlignment.Top;
            WPFRendering.RecalculateSize(grid);
            return grid;
        }