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); } }
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 { } }
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); } }
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); } }