CreateTestModels() public static method

public static CreateTestModels ( ) : List
return List
Beispiel #1
0
        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            List <MyModel> items = MyModel.CreateTestModels();

            this.cbGifs.ItemsSource  = items;
            this.cbGifs.SelectedItem = items[0];

            _effects.Add(new EffectWrapper("Brightness", new BrightnessEffectDescription(new Vector2(1.0f, 0.8f), new Vector2(0, 0.1f))));
            _effects.Add(new EffectWrapper("ColorMatrix", new ColorMatrixEffectDescription(
                                               new[] {
                0.2125f, 0.2125f, 0.2125f, 0.0f,
                0.7154f, 0.7154f, 0.7154f, 0.0f,
                0.0721f, 0.0721f, 0.0721f, 0.0f,
                0.0f, 0.0f, 0.0f, 1.0f,
                0.0f, 0.0f, 0.0f, 0.0f
            },
                                               ColorMatrixAlphaMode.Straight, true)));

            var convolve = new ConvolveMatrixEffectDescription();

            convolve.SetKernelMatrix(new[] { -1.0f, -1.0f, -1.0f, -1.0f, 9.0f, -1.0f, -1.0f, -1.0f, -1.0f }, 3, 3);
            _effects.Add(new EffectWrapper("Convolve", convolve));
            _effects.Add(new EffectWrapper("Hue", new HueEffectDescription(180.0f)));
            _effects.Add(new EffectWrapper("Saturation", new SaturationEffectDescription()));
            _effects.Add(new EffectWrapper("Gaussian Blur", new GaussianBlurEffectDescription(5.0f, GaussianBlurOptimization.Speed, GaussianBlurBorderMode.Soft)));
            _effects.Add(new EffectWrapper("Tint", new TintEffectDescription(new Vector4F(1.0f, 1.0f, 5.0f, 1.0f))));
            this.cbEffects.ItemsSource     = _effects;
            this.cbEffects.PlaceholderText = "No effects selected";
            //this.cbEffects.SelectedItem = _effects[0];
        }
Beispiel #2
0
        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            AnimationBehavior.OnError       += AnimationBehavior_OnError;
            AnimationBehavior.OnImageLoaded += AnimationBehavior_OnImageLoaded;
            List <MyModel> items = MyModel.CreateTestModels();

            this.cbGifs.ItemsSource  = items;
            this.cbGifs.SelectedItem = items[0];
            AnimationBehavior.SetRenderEffects(_gifImage, GetActiveEffects());
        }