Exemplo n.º 1
0
Arquivo: SNode.cs Projeto: Daoting/dt
        static void OnShapeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SNode node = (SNode)d;

            node.UpdateShape();
            if (!string.IsNullOrEmpty((string)e.NewValue) || !string.IsNullOrEmpty((string)e.OldValue))
            {
                node.SavePropertyChange(e);
            }
        }
Exemplo n.º 2
0
Arquivo: SNode.cs Projeto: Daoting/dt
        static void OnFlagChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            SNode node = (SNode)d;
            Icons flag = (Icons)e.NewValue;

            if (flag == Icons.None)
            {
                node.FlagShape = null;
            }
            else
            {
                var shape = Res.GetIcon(flag, 20, Res.WhiteBrush);
                shape.IsHitTestVisible = false;
                node.FlagShape         = shape;
            }
            if (flag != Icons.None || (Icons)e.OldValue != Icons.None)
            {
                node.SavePropertyChange(e);
            }
        }