コード例 #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);
     }
 }
コード例 #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);
 }
コード例 #3
0
ファイル: LabelProperties.cs プロジェクト: goutkannan/ironlab
 /// <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);
 }
コード例 #4
0
ファイル: LabelProperties.cs プロジェクト: goutkannan/ironlab
 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);
     }
 }
コード例 #5
0
ファイル: Axis3D.cs プロジェクト: goutkannan/ironlab
 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);
 }