private static void MarginCombo_ValueChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs)
        {
            MarginCombo combo = (MarginCombo)dependencyObject;
            Padding     p     = (Padding)dependencyPropertyChangedEventArgs.NewValue;

            combo.entries[1].Value = p.Left;
            combo.entries[2].Value = p.Top;
            combo.entries[3].Value = p.Right;
            combo.entries[4].Value = p.Bottom;
            combo.entries[0].Value = combo.entries.Skip(1).All(e => e.Value == p.Left) ? p.Left : -1;
        }
 public MarginEntry(MarginCombo parent, int idx)
 {
     Index  = idx;
     Parent = parent;
 }
Example #3
0
 public MarginEntry(MarginCombo parent, int idx) {
     Index = idx;
     Parent = parent;
 }