예제 #1
0
        public MainViewModel()
        {
            Demos = new[]
            {
                new Demo
                {
                    Name  = "Manual Values",
                    Files = new[] { "ManualValues.xaml" },
                    Type  = typeof(ManualValues)
                },
                new Demo
                {
                    Name  = "Manual Values: X and Y",
                    Files = new[] { "ManualValuesXAndY.xaml" },
                    Type  = typeof(ManualValuesXAndY)
                },
                new Demo
                {
                    Name  = "Manual Values: Colors",
                    Files = new[] { "ManualValuesColors.xaml" },
                    Type  = typeof(ManualValuesColors)
                },
                new Demo
                {
                    Name  = "Manual Values: Labels",
                    Files = new[] { "ManualValuesLabels.xaml" },
                    Type  = typeof(ManualValuesLabels)
                },
                new Demo
                {
                    Name  = "Binding Observable Collection",
                    Files = new[] { "BindingObservableCollection.xaml", "BindingObservableCollectionViewModel.cs" },
                    Type  = typeof(BindingObservableCollection)
                },
                new Demo
                {
                    Name  = "Binding Data Properties",
                    Files = new[] { "BindingDataProperties.xaml", "BindingDataPropertiesViewModel.cs" },
                    Type  = typeof(BindingDataProperties)
                },
                new Demo
                {
                    Name  = "Sample Values",
                    Files = new[] { "SampleValues.xaml" },
                    Type  = typeof(SampleValues)
                },
                new Demo
                {
                    Name  = "Sample Values Binding",
                    Files = new[] { "SampleValuesBinding.xaml" },
                    Type  = typeof(SampleValuesBinding)
                }
            };

            SelectedDemo = Demos.FirstOrDefault();
        }