void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this._param1 = ((System.Windows.Controls.Slider)(target)); return; case 2: this._param2 = ((System.Windows.Controls.Slider)(target)); return; case 3: this._param3 = ((System.Windows.Controls.Slider)(target)); return; case 4: this._animStarter = ((System.Windows.Controls.Button)(target)); return; case 5: this._animReset = ((System.Windows.Controls.Button)(target)); return; case 6: this._dynEffect = ((FluidKit.Shaders.DynamicShaderEffect)(target)); return; case 7: this.RippleAnimation = ((System.Windows.Media.Animation.BeginStoryboard)(target)); return; } this._contentLoaded = true; }
private static void OnDynamicShaderChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { DynamicShaderType type = (DynamicShaderType)e.NewValue; DynamicShaderEffect effect = d as DynamicShaderEffect; int index = Array.IndexOf(Enum.GetValues(typeof(DynamicShaderType)), type); effect.SetValue(ShaderIndexProperty, (double)index); }