Пример #1
0
        private void RemoChil(UserControl a)
        {
            master.Children.Remove(a);
            Iblock ai = (a as Iblock).GetChild();

            while (ai != null)
            {
                Thickness t = ai.GetMargin();
                ai.SetMargin(new Thickness(t.Left, t.Top - 60, 0, 0));
                ai = ai.GetChild();
            }
        }
Пример #2
0
        private void AddBlock(Iblock u)
        {
            //	if (u.GetType () == typeof (TurnBlock)) {
            //		FocusManager.SetFocusedElement (master, ( u as TurnBlock ).valBox);
            //			( u as TurnBlock ).valBox.Focus ();
            //			Keyboard.Focus (( u as TurnBlock ).valBox);
            //			( u as TurnBlock ).valBox.SelectAll ();
            //	}
            Iblock w = start.GetLowestChild();

            w.AddBlock(u);
            u.SetParent(w);
            Thickness t = w.GetMargin();

            u.SetMargin(new Thickness(t.Left, t.Top + 60, 0, 0));
            master.Children.Add(u as UserControl);
        }