Beispiel #1
0
 private static void block_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     TextBlock text = sender as TextBlock;
     if (string.IsNullOrEmpty(text.Text))
         text.Visibility = Visibility.Collapsed;
     else
         text.Visibility = Visibility.Visible;
 }
Beispiel #2
0
 private void GameGrid_SizeChanged(object Sender, SizeChangedEventArgs Args)
 {
     for (var y = 0; y < _ROWS; ++y)
     {
         for (var x = 0; x < _COLS; ++x)
         {
             _underlyingTiles[x][y].Width = GetTileSize();
             _underlyingTiles[x][y].Height = GetTileSize();
             _underlyingTiles[x][y].SetValue(Canvas.LeftProperty, x * GetTileSize());
             _underlyingTiles[x][y].SetValue(Canvas.TopProperty, y * GetTileSize());
         }
     }
 }
        void page_SizeChanged(object sender, SizeChangedEventArgs e)
        {
            var orientation = ApplicationView.Value;

            if (ResponsiveMethods != null)
            {
                foreach(var method in ResponsiveMethods)
                {
                    method.HandleChange(e.NewSize,
                                        orientation,
                                        false,
                                        this.Resources.MergedDictionaries);
                }
            }

        }
Beispiel #4
0
 private void StdOutputText_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     StdOutputScroller.ChangeView(null, StdOutputScroller.ScrollableHeight, null);
 }
Beispiel #5
0
 private void Window_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     this.shellService.SaveWindowSize(this.WindowState, new Size(this.ActualWidth, this.ActualHeight));
 }
        /// <summary>
        /// Inherited code: Requires comment.
        /// </summary>
        /// <param name="sender">Inherited code: Requires comment 1.</param>
        /// <param name="e">Inherited code: Requires comment 2.</param>
        private void Calendar_SizeChanged(object sender, SizeChangedEventArgs e)
        {
            Debug.Assert(sender is GlobalCalendar, "The sender should be a GlobalCalendar!");

            RectangleGeometry rg = new RectangleGeometry();
            rg.Rect = new Rect(0, 0, e.NewSize.Width, e.NewSize.Height);

            if (Root != null)
            {
                Root.Clip = rg;
            }
        }
Beispiel #7
0
 /// <summary>
 /// The size of the popup child has changed.
 /// </summary>
 /// <param name="sender">The source object.</param>
 /// <param name="e">The event data.</param>
 private void PopupChild_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     Arrange();
 }
Beispiel #8
0
 /// <summary>
 ///     Size changed handler for InteralScrollContentPresenter.
 /// </summary>
 private void OnInternalScrollContentPresenterSizeChanged(object sender, SizeChangedEventArgs e)
 {
     if (_internalScrollContentPresenter != null &&
         !_internalScrollContentPresenter.CanContentScroll)
     {
         OnViewportSizeChanged(e.PreviousSize, e.NewSize);
     }
 }
Beispiel #9
0
 void browserTab_WindowSetWidth(object sender, SizeChangedEventArgs e)
 {
     Width = e.Size + 10;
 }
Beispiel #10
0
 private void MainDockPanel_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     CalculateScale();
 }
        /// <summary>
        /// Handles the SizeChanged event of the ContainerCollection control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="SizeChangedEventArgs"/> instance containing the event data.</param>
        void ContainerCollection_SizeChanged(object sender, SizeChangedEventArgs e)
        {
            #if !WPF
            RectangleGeometry clipRectGeometry = new RectangleGeometry();
            clipRectGeometry.Rect = new Rect(new Point(0, 0), new Size(this.ActualWidth,this.ActualHeight));
            this.Clip = clipRectGeometry;
            #endif

            Refresh();
        }
 private void ElementSizeChanged(object sender, SizeChangedEventArgs e)
 {
     SizeChanged.SafeInvoke();
 }
 void AbstractKeyboardLayout_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     UpdateKeyboardLayout();
 }
 private void OnSizeChanged(object sender, SizeChangedEventArgs e)
 {
     HelperFunctions.UpdateCanvasSize(RootGrid, outputGrid, inkCanvas);
 }
Beispiel #15
0
 private void OnSizeChanged(object sender, SizeChangedEventArgs e)
 {
     fix(e.NewSize.Width);
 }
 private void Window_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     Top = System.Windows.SystemParameters.WorkArea.Height - ActualHeight;
 }
Beispiel #17
0
        private void OnSizeChanged(object sender, SizeChangedEventArgs e)
        {
            if (e != null)
            {
                FullscreenPanelHeight = e.NewSize.Height;
                PanelWidth = e.NewSize.Width;
            }

            TippingPointY = FullscreenPanelHeight / 2;
            RecalculateMaxTransformY();
        }
Beispiel #18
0
 /// <summary>
 /// Calback which redraws the ANN onto the canvas.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void AnnCanvas_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     DrawANN();
 }
 /// <summary>
 /// Called when the content changes size.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="System.Windows.SizeChangedEventArgs"/> 
 /// instance containing the event data.</param>
 private void OnExpandSiteContentSizeChanged(object sender, SizeChangedEventArgs e)
 {
     // only needed if we are not currently already working on a transition
     // if a sizechange occurs during a transition, it is not possible
     // to distinquish between one triggered by the expand/collapse 
     // storyboard, or one by the content itself.
     if (IsSelected && _isBusyWithAction == false)
     {
         // only undertake this in a situation where the resized content
         // can be shown, ie. in a non-fixed scenario.
         if ((!ShouldFillWidth && e.PreviousSize.Width != e.NewSize.Width) ||
             (!ShouldFillHeight && e.PreviousSize.Height != e.NewSize.Height))
         {
             // since size has changed, a fresh approach should be taken
             ExpandSite.MeasureContent(ExpandSite.CalculateDesiredContentSize());
             ExpandSite.RecalculatePercentage(ExpandSite.TargetSize);
             // schedule a resize to move to this new size
             Schedule(AccordionAction.Resize);
         }
     }
 }
Beispiel #20
0
 private void Window_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     ReDraw();
 }
Beispiel #21
0
 private static void OnRootVisualSizeChanged(object sender, SizeChangedEventArgs e)
 { 
     if (ToolTipService._currentToolTip != null) 
     {
         ToolTipService._currentToolTip.OnRootVisualSizeChanged(); 
     }
 }
Beispiel #22
0
 void _hueCanvas_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     _suppressValueChanged = true;
     HueSelectorPos        = _hueSelectorValue * e.NewSize.Height;
     _suppressValueChanged = false;
 }
Beispiel #23
0
 void browserTab_WindowSetHeight(object sender, SizeChangedEventArgs e)
 {
     Height = e.Size + 30;
 }
Beispiel #24
0
 private void RangeSlider_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     this.AdjustView();
 }
 private void UserControl_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     ResizeToolbar(MainToolbar, edAddress);
 }
Beispiel #26
0
        private void _grid_SizeChanged(object sender, SizeChangedEventArgs e)
        {
            double width = _gridTextFilesSettings.ColumnDefinitions[0].ActualWidth - 11;

            _tviItemDb._grid.Width = width < 0 ? 0 : width;
        }
 /// <summary>
 /// Handles the case where the size of a label has changed.
 /// </summary>
 /// <param name="sender">The element.</param>
 /// <param name="e">The event args.</param>
 private void OnLabelSizeChanged(object sender, SizeChangedEventArgs e)
 {
     this.AlignLabelColumns();
     this.AlignDescriptionColumns();
 }
Beispiel #28
0
 void OnOrientationChanged(object sender, SizeChangedEventArgs e)
 {
     MessagingCenter.Send(this, WPFDeviceInfo.BWPorientationChangedName, this.ToDeviceOrientation());
 }
        void OnSizeChanged(object sender, SizeChangedEventArgs e)
        {
            if (Orientation == Orientation.Vertical)
                _centeringTransform.Y = Math.Round(e.NewSize.Height / 2);
            else
                _centeringTransform.X = Math.Round(e.NewSize.Width / 2);

            Clip = new RectangleGeometry() { Rect = new Rect(0, 0, e.NewSize.Width, e.NewSize.Height) };
            UpdateData();
        }
 void AdPlayer_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     if (AdSizeChanged != null) AdSizeChanged(this, EventArgs.Empty);
 }
Beispiel #31
0
 void TargetElement_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     notificationsPending = observedChildren.Count;
 }
 private void Window_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     Title = $"H: {Height} W:{Width}";
 }
 /// <summary>
 /// Inherited code: Requires comment.
 /// </summary>
 /// <param name="sender">Inherited code: Requires comment 1.</param>
 /// <param name="e">Inherited code: Requires comment 2.</param>
 private void Calendar_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     SetPopUpPosition();
 }
Beispiel #34
0
 private void PhoneApplicationPage_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     updateScreenSize();
 }
		private void LayoutRoot_SizeChanged(object sender, SizeChangedEventArgs e)
		{
			if (PropertyChanged != null)
				PropertyChanged(this, new PropertyChangedEventArgs("FullWidth"));
		}
Beispiel #36
0
 private void RhodesWebBrowser_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     // TODO: webview size changed event handler ?
 }
 /// <summary>
 /// Called when the size of the control changes.
 /// </summary>
 /// <param name="sender">The sender.</param>
 /// <param name="e">The <see cref="System.Windows.SizeChangedEventArgs"/> 
 /// instance containing the event data.</param>
 private void OnHeaderSizeChanged(object sender, SizeChangedEventArgs e)
 {
     // allow the parent to reschedule a layout pass.
     if (ParentAccordion != null)
     {
         ParentAccordion.OnHeaderSizeChange(this);
     }
 }
Beispiel #38
0
 private void OutputGrid_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     GraphViewer.Invalidate();
 }
        void ControlPanel_SizeChanged(object sender, SizeChangedEventArgs e)
        {
            Orientation = (e.NewSize.Height > e.NewSize.Width) ? ControlPanelOrientation.Portrait : ControlPanelOrientation.Landscape;

#if !SILVERLIGHT
            if (!IsInDesignMode)
            {
#if !WINDOWS80
                var physicalSize = GetPhysicalSize(e.NewSize);
                IsCompact = (physicalSize.Width <= CompactThresholdInInches);
#else
                IsCompact = ApplicationView.Value == ApplicationViewState.Snapped;
#endif
            }
            else
#endif
            {
                IsCompact = e.NewSize.Width <= 853.0;
            }
        }
 // Callback Functions
 private void Window_SizeChanged(object sender, SizeChangedEventArgs args)
 {
     mm.paintKeyboard();
 }
 void this_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     currentSize = e.NewSize;
     UpdateFontSize(e.NewSize, FontSizePercent);
 }
Beispiel #42
0
 /// <summary>
 /// resize the textBox font to relative control size
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void TxtTempInput_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     ((TextBox)sender).FontSize = ((TextBox)sender).ActualHeight * .7;
 }
 /// <summary>
 /// Handles the SizeChanged event of the ItemContainer.
 /// </summary>
 /// <param name="sender">Event source.</param>
 /// <param name="e">Event arguments.</param>
 private void ItemContainerSizeChanged(object sender, SizeChangedEventArgs e)
 {
     _clipGeometry.Rect = new Rect(0, 0, e.NewSize.Width, e.NewSize.Height);
     QueueUpdateDataItemPlacement(false, false, DataItems);
 }
Beispiel #44
0
 /// <summary>
 /// resize the passwordBox font to relative control size
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void PassTempInput_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     ((PasswordBox)sender).FontSize = ((PasswordBox)sender).ActualHeight * .7;
 }
        void bt_SizeChanged(object sender, SizeChangedEventArgs e) {

        }
Beispiel #46
0
 private void Scroll_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     Draw();
 }
Beispiel #47
0
 void browserTab_WindowSetLeft(object sender, SizeChangedEventArgs e)
 {
     Left = e.Size;
 }
Beispiel #48
0
 private void PageTitle_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     scrollTitle.ScrollToHorizontalOffset(scrollTitle.ScrollableWidth);
 }
Beispiel #49
0
 void browserTab_WindowsSetTop(object sender, SizeChangedEventArgs e)
 {
     Top = e.Size;
 }
 void OnNativeSizeChanged(object sender, SizeChangedEventArgs e)
 {
     UpdateContainerArea();
 }
 /// <summary>
 /// Invalidate measure when edge panel is resized.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">Information about the event.</param>
 private void EdgePanelSizeChanged(object sender, SizeChangedEventArgs e)
 {
     InvalidateMeasure();
 }
Beispiel #52
0
 private void UserControl_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     Fit();
 }
Beispiel #53
0
        static void Element_SizeChanged(object sender, SizeChangedEventArgs e)
        {
            var element = sender as FrameworkElement;

            UpdateClipSize(element, e.NewSize);
        }
 private void OnSizeChanged(object sender, SizeChangedEventArgs e)
 {
     searchBox.SearchWidth = e.NewSize.Width > 640 ? 230 : 190;
 }
        /// <summary>
        /// Handles the SizeChanged event of a DataPoint to update the value margins for the series.
        /// </summary>
        /// <param name="sender">Event source.</param>
        /// <param name="e">Event arguments.</param>
        private void DataPointSizeChanged(object sender, SizeChangedEventArgs e)
        {
            DataPoint dataPoint = (DataPoint)sender;
            DataItem dataItem = DataItemFromDataPoint(dataPoint);

            // Update placement
            double newWidth = e.NewSize.Width;
            double newHeight = e.NewSize.Height;
            Canvas.SetLeft(dataItem.Container, Math.Round(dataItem.CenterPoint.X - (newWidth / 2)));
            Canvas.SetTop(dataItem.Container, Math.Round(dataItem.CenterPoint.Y - (newHeight / 2)));

            // Update value margins
            double heightMargin = newHeight * (3.0 / 4.0);
            NotifyValueMarginsChanged(ActualDependentAxis, new ValueMargin[] { new ValueMargin(dataItem.ActualStackedDependentValue, heightMargin, heightMargin) });
            double widthMargin = newWidth * (3.0 / 4.0);
            NotifyValueMarginsChanged(ActualIndependentAxis, new ValueMargin[] { new ValueMargin(dataPoint.ActualIndependentValue, widthMargin, widthMargin) });
        }
Beispiel #56
0
 private void LightWindow_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     AutoFitButtons();
 }
 private void OnSizeChanged(object sender, SizeChangedEventArgs e)
 {
     Clip = new RectangleGeometry {Rect = new Rect(0, 0, ActualWidth, ActualHeight)};
 }
Beispiel #58
0
 private void canvas_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     this.UpdateIntervals(this.ActualWidth);
 }
 private void WrapGrid_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     var top = (LayoutRoot.RowDefinitions[1].ActualHeight - 470) / 2;
     //ScrollViewer.Padding = new Thickness(0, top, 0, 0);
 }
 /// <summary>
 /// Called when an element gets resized.
 /// </summary>
 /// <param name="sender">The event sender.</param>
 /// <param name="e">The event information.</param>
 /// <remarks>
 /// Ideally, the Loaded event should be handled instead of
 /// the SizeChanged event. However, the Loaded event does not occur
 /// by the time the TransitionFrame tries to animate a forward in transition.
 /// Handling the SizeChanged event instead guarantees that
 /// the newly created FrameworkElements can be subscribed in time
 /// before the transition begins.
 /// </remarks>
 private static void Target_SizeChanged(object sender, SizeChangedEventArgs e)
 {
     SubscribeFrameworkElement((FrameworkElement)sender);
 }