Esempio n. 1
0
        /// <summary>
        /// Convert a Nucleus binding to a WPF one
        /// </summary>
        /// <param name="binding"></param>
        /// <returns></returns>
        public static Binding Convert(PathBinding binding)
        {
            var result = new Binding(binding.Path);

            result.Source = binding.Source;
            return(result);
        }
Esempio n. 2
0
 /// <summary>
 /// Initialises a new label with a bound text value
 /// </summary>
 /// <param name="position"></param>
 /// <param name="textBinding"></param>
 /// <param name="textSize"></param>
 /// <param name="verticalSetOut"></param>
 /// <param name="horizontalSetOut"></param>
 /// <param name="attributes"></param>
 public Label(Vector position, PathBinding textBinding, double textSize = 1.0,
              VerticalSetOut verticalSetOut = VerticalSetOut.Top, HorizontalSetOut horizontalSetOut = HorizontalSetOut.Left,
              GeometryAttributes attributes = null) : base(position)
 {
     TextBinding      = textBinding;
     TextSize         = textSize;
     VerticalSetOut   = verticalSetOut;
     HorizontalSetOut = horizontalSetOut;
     Attributes       = attributes;
 }