Beispiel #1
0
        private static void ScreenPosition_PropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            Overview       overview = sender as Overview;
            ScreenPosition position = (ScreenPosition)e.NewValue;

            if (overview != null)
            {
                switch (position)
                {
                case ScreenPosition.TopLeft:
                    overview.VerticalContentAlignment   = VerticalAlignment.Top;
                    overview.HorizontalContentAlignment = HorizontalAlignment.Left;
                    break;

                case ScreenPosition.TopRight:
                    overview.VerticalContentAlignment   = VerticalAlignment.Top;
                    overview.HorizontalContentAlignment = HorizontalAlignment.Right;
                    break;

                case ScreenPosition.BottomLeft:
                    overview.VerticalContentAlignment   = VerticalAlignment.Bottom;
                    overview.HorizontalContentAlignment = HorizontalAlignment.Left;
                    break;

                case ScreenPosition.BottomRight:
                    overview.VerticalContentAlignment   = VerticalAlignment.Bottom;
                    overview.HorizontalContentAlignment = HorizontalAlignment.Right;
                    break;

                default:
                    break;
                }
            }
        }
Beispiel #2
0
        private static void Effect_PropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            Overview overview = sender as Overview;
            Effect   effect   = e.NewValue as Effect;

            if (overview != null && effect != null && overview._Canvas != null)
            {
                overview._Canvas.Effect = effect;
            }
        }
Beispiel #3
0
        private static void Overview_PropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            PanZoomPanel panZoomPanel = sender as PanZoomPanel;
            Overview     overview     = e.NewValue as Overview;

            if (panZoomPanel != null && overview != null)
            {
                overview.DataContext = panZoomPanel;
            }
        }