コード例 #1
0
        private void SaveList_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var psave = SaveList.SelectedItem;

            if (psave is ProfileSave ps)
            {
                SaveInfo_Name.Content = "이름: " + ps.savename;
                SaveInfo_Dir.Content  = "폴더: " + ps.directory;
                SaveInfo_Date.Content = "날짜: " + ps.formattedtime;

                if (SaveInfo.Visibility != Visibility.Visible)
                {
                    var anim = new DoubleAnimation(0, 1, new Duration(TimeSpan.FromSeconds(0.2)))
                    {
                        DecelerationRatio = 1
                    };
                    SaveInfo.BeginAnimation(StackPanel.OpacityProperty, anim);

                    var anim0 = new DoubleAnimation(1, 0.8, new Duration(TimeSpan.FromSeconds(0.1)))
                    {
                        DecelerationRatio = 1,
                        AutoReverse       = true
                    };
                    SaveList.BeginAnimation(ListBox.OpacityProperty, anim0);
                }

                SaveInfo.Visibility = Visibility.Visible;
                if (TaskListPanel.Visibility == Visibility.Visible)
                {
                    SavegameChanged(true);
                }
            }
        }