コード例 #1
0
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            _Content = this.Template.FindName("PART_Content", this) as FrameworkElement;
            if (_Content != null)
            {
                this._ZoomTransform   = new ScaleTransform(Zoom, Zoom);
                this._OffsetTransform = new TranslateTransform();

                this._ZoomTransform.Changed   += new EventHandler(ZoomTransform_Changed);
                this._OffsetTransform.Changed += new EventHandler(OffsetTransform_Changed);

                TransformGroup transformGroup = new TransformGroup();
                transformGroup.Children.Add(this._ZoomTransform);
                transformGroup.Children.Add(this._OffsetTransform);
                _Content.RenderTransform = transformGroup;
            }

            AdornerLayer layer = AdornerLayer.GetAdornerLayer(this);

            if (layer != null && _Adorner == null)
            {
                _Adorner = new AdornerContentPresenter(this, Overview);
                layer.Add(_Adorner);
            }
        }
コード例 #2
0
ファイル: FrameWork.xaml.cs プロジェクト: BdGL3/CXPortal
        public FrameWork(EventLoggerAccess logger)
        {
            try
            {

                InitializeComponent();
                CultureResources.registerDataProvider(this);

                _Logger = logger;
                _StatusInfoDisplay = new StatusInfoDisplay(logger);
                _StatusAdorner = new AdornerContentPresenter(DisplayArea, _StatusInfoDisplay);
                _AboutBox = new AboutBox();
                _AboutAdorner = new AdornerContentPresenter(DisplayArea, _AboutBox);
                _AdornerLayerManager = new AdornerLayerManager(AdornerLayer.GetAdornerLayer(DisplayArea));
                _WidgetPages = new List<WidgetPage>();
            }
            catch
            {
            }
        }
コード例 #3
0
ファイル: FrameWork.xaml.cs プロジェクト: BdGL3/CXPortal
 public void Add(CompleteInfo completeInfo)
 {
     try
     {
         AdornerContentPresenter adorner = new AdornerContentPresenter(DisplayArea, completeInfo.Display);
         _AdornerLayerManager.Add(completeInfo.Name, adorner);
         _AdornerLayerManager.Show(completeInfo.Name);
         CompleteInfoLinks.Children.Add(completeInfo.Link);
     }
     catch (Exception ex)
     {
         _Logger.LogError(ex);
     }
 }
コード例 #4
0
ファイル: PanZoomPanel.cs プロジェクト: BdGL3/CXPortal
        public override void OnApplyTemplate ()
        {
            base.OnApplyTemplate();

            _Content = this.Template.FindName("PART_Content", this) as FrameworkElement;
            if (_Content != null)
            {
                this._ZoomTransform = new ScaleTransform(Zoom, Zoom);
                this._OffsetTransform = new TranslateTransform();

                this._ZoomTransform.Changed += new EventHandler(ZoomTransform_Changed);
                this._OffsetTransform.Changed += new EventHandler(OffsetTransform_Changed);

                TransformGroup transformGroup = new TransformGroup();
                transformGroup.Children.Add(this._ZoomTransform);
                transformGroup.Children.Add(this._OffsetTransform);
                _Content.RenderTransform = transformGroup;
            }

            AdornerLayer layer = AdornerLayer.GetAdornerLayer(this);
            if (layer != null && _Adorner == null)
            {
                _Adorner = new AdornerContentPresenter(this, Overview);
                layer.Add(_Adorner);
            }
        }