如何将visual studio设置为自动生成控制代码

时间:2014-08-01 11:22:46

标签: c# wpf entity-framework

我有问题。在此链接中: http://msdn.microsoft.com/en-us/data/gg638943 [^]

我们可以看到代码是自动生成的。但是当我以相同的方式拖放某个实体时,visual studio只生成这个:

using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Testowy
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {

            System.Windows.Data.CollectionViewSource taktTimerEntitiesViewSource = ((System.Windows.Data.CollectionViewSource)(this.FindResource("taktTimerEntitiesViewSource")));
            // Load data by setting the CollectionViewSource.Source property:
            // taktTimerEntitiesViewSource.Source = [generic data source]
        }
    }
}

我有visual studio 2012.我在Visual Studio 2010 Express中尝试过相同但情况相同。有人可以帮忙吗?

0 个答案:

没有答案