Esempio n. 1
0
        /// <summary>
        /// Callback called when the Color value has changed (i.e. by databinding).
        /// </summary>
        /// <param name="d">Sender object</param>
        /// <param name="e">Callback arguments</param>
        private static void ColorPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            XyzAxis3D element = (XyzAxis3D)d;

            SolidColorBrush solidColorBrush = new SolidColorBrush();

            solidColorBrush.Color   = element.Color;
            element._arrowsMaterial = new DiffuseMaterial(solidColorBrush);
            element.InvalidateModel();
        }
Esempio n. 2
0
        /// <summary>
        /// Callback called when a visual dependency property value has changed (i.e. by databinding).
        /// </summary>
        /// <param name="d">Sender object</param>
        /// <param name="e">Callback arguments</param>
        protected static void VisualPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            XyzAxis3D element = (XyzAxis3D)d;

            element.InvalidateModel();
        }