Exemplo n.º 1
0
        private void UnCollapseUi()
        {
            IsCollapse = false;
            DoubleAnimation anim = new DoubleAnimation();

            anim.From     = CurrentRoomBox.Height;
            anim.To       = CurrentRoomBox.MaxHeight;
            anim.Duration = new Duration(TimeSpan.FromMilliseconds(ANIM_SPEED));
            CurrentRoomBox.BeginAnimation(Border.HeightProperty, anim);
            anim.From = RoomListBox.Height;
            anim.To   = 230;
            RoomListBox.BeginAnimation(Border.HeightProperty, anim);
        }
Exemplo n.º 2
0
        private void CollapseUi()
        {
            IsCollapse = true;
            //Свернуть box текущей комнаты
            DoubleAnimation anim = new DoubleAnimation();

            anim.From     = CurrentRoomBox.Height;
            anim.To       = 60;
            anim.Duration = new Duration(TimeSpan.FromMilliseconds(ANIM_SPEED));
            CurrentRoomBox.BeginAnimation(Border.HeightProperty, anim);
            anim.From = RoomListBox.Height;
            anim.To   = RoomListBox.MaxHeight - 90;
            RoomListBox.BeginAnimation(Border.HeightProperty, anim);
        }
Exemplo n.º 3
0
        private void CloseUi()
        {
            if (IsOpen)
            {
                IsOpen = false;
                CurrentRoomBox.IsEnabled = false;

                DoubleAnimation anim = new DoubleAnimation();
                anim.From     = CurrentRoomBox.Height;
                anim.To       = 0;
                anim.Duration = new Duration(TimeSpan.FromMilliseconds(ANIM_SPEED));
                CurrentRoomBox.BeginAnimation(Border.HeightProperty, anim);
                anim.From = RoomListBox.Height;
                anim.To   = RoomListBox.MaxHeight;
                RoomListBox.BeginAnimation(Border.HeightProperty, anim);
            }
        }