Ejemplo n.º 1
0
 internal void SetParent(LabelProperties parentLabelProperties)
 {
     FieldInfo[] fields = this.GetType().GetFields();
     foreach (FieldInfo field in fields)
     {
         DependencyProperty dp               = (DependencyProperty)field.GetValue(this);
         DependencyProperty dpTextblock      = (DependencyProperty)(parentLabelProperties.GetType().GetField(string.Concat(dp.Name, "Property")).GetValue(parentLabelProperties));
         Binding            bindingTransform = new Binding(dp.Name);
         bindingTransform.Source = parentLabelProperties;
         bindingTransform.Mode   = BindingMode.OneWay;
         BindingOperations.SetBinding(this, dpTextblock, bindingTransform);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Constructor offering the ability to bind the new object to a parent.
 /// </summary>
 /// <param name="parentLabelProperties">Parent set of properties.</param>
 public LabelProperties(LabelProperties parentLabelProperties) : base()
 {
     SetParent(parentLabelProperties);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Constructor offering the ability to bind the new object to a parent.
 /// </summary>
 /// <param name="parentLabelProperties">Parent set of properties.</param>
 public LabelProperties(LabelProperties parentLabelProperties) : base()
 {
     SetParent(parentLabelProperties);
 }
Ejemplo n.º 4
0
 internal void SetParent(LabelProperties parentLabelProperties)
 {
     FieldInfo[] fields = this.GetType().GetFields();
     foreach (FieldInfo field in fields)
     {
         DependencyProperty dp = (DependencyProperty)field.GetValue(this);
         DependencyProperty dpTextblock = (DependencyProperty)(parentLabelProperties.GetType().GetField(string.Concat(dp.Name, "Property")).GetValue(parentLabelProperties));
         Binding bindingTransform = new Binding(dp.Name);
         bindingTransform.Source = parentLabelProperties;
         bindingTransform.Mode = BindingMode.OneWay;
         BindingOperations.SetBinding(this, dpTextblock, bindingTransform);
     }
 }
Ejemplo n.º 5
0
 public Axis3D(Axes3D axes, Axis3DCollection axisCollection)
 {
     axisLabels = new List<TextBlock>();
     labelProperties = new LabelProperties(axisCollection.TickLabels);
     model3D = new LinesModel3D();
     this.axes = axes;
     this.axisCollection = axisCollection;
     this.axes.Children.Add(model3D);
 }