Exemple #1
0
 private void ItemsWrapGrid_BringIntoViewRequested(UIElement sender, BringIntoViewRequestedEventArgs args)
 {
     if (args.TargetRect.Height <= 246)
     {
         var t = args.TargetRect;
         t = new Rect(t.X, t.Y, t.Width, t.Height + Helpers.ConstantsHelper.PlayListHeightField);
         args.TargetRect = t;
     }
 }
Exemple #2
0
        private void FrameworkElement_BringIntoViewRequested(UIElement sender, BringIntoViewRequestedEventArgs args)
        {
            string asyncEventMessage = "BringIntoViewRequested Sender=" + (sender as FrameworkElement).Name;

            asyncEventMessage += ", AnimationDesired=" + args.AnimationDesired + ", Handled=" + args.Handled;
            asyncEventMessage += ", HorizontalAlignmentRatio=" + args.HorizontalAlignmentRatio + ", VerticalAlignmentRatio=" + args.VerticalAlignmentRatio;
            asyncEventMessage += ", HorizontalOffset=" + args.HorizontalOffset + ", VerticalOffset=" + args.VerticalOffset;
            asyncEventMessage += ", TargetRect=" + args.TargetRect + ", TargetElement=" + (args.TargetElement as FrameworkElement).Name;
            asyncEventMessage += ", OriginalSource=";
            if (args.OriginalSource == null)
            {
                asyncEventMessage += "null";
            }
            else
            {
                asyncEventMessage += (args.OriginalSource as FrameworkElement).Name;
            }
            AppendAsyncEventMessage(asyncEventMessage);
        }
 /// <summary>
 /// Sets a value that marks the routed event as handled. A <c>true</c> value prevents most handlers
 /// along the event route from handling the same event again.
 /// </summary>
 /// <param name="e">The requested <see cref="BringIntoViewRequestedEventArgs"/>.</param>
 /// <param name="handled">
 /// <c>true</c> to mark the routed event handled. <c>false</c> to leave the routed event unhandled,
 /// which permits the event to potentially route further and be acted on by other handlers.
 /// The default is <c>false</c>.
 /// </param>>
 public static void Handled(this BringIntoViewRequestedEventArgs e, bool handled) => Resolver.Handled(e, handled);
 /// <summary>
 /// Gets the horizontal distance to add to the viewport-relative position of the TargetRect
 /// after satisfying the requested HorizontalAlignmentRatio.
 /// </summary>
 /// <param name="e">The requested <see cref="BringIntoViewRequestedEventArgs"/>.</param>
 /// <returns>
 /// The horizontal distance to add to the viewport-relative position of the TargetRect
 /// after satisfying the requested HorizontalAlignmentRatio.
 /// </returns>
 public static double HorizontalOffset(this BringIntoViewRequestedEventArgs e) => Resolver.HorizontalOffset(e);
 /// <summary>
 /// Gets the horizontal distance that should be added to the viewport-relative position of the TargetRect
 /// after satisfying the requested HorizontalAlignmentRatio.
 /// </summary>
 /// <param name="e">The requested <see cref="BringIntoViewRequestedEventArgs"/>.</param>
 /// <returns>
 /// The horizontal distance that should be added to the viewport-relative position of the TargetRect
 /// after satisfying the requested HorizontalAlignmentRatio.
 /// </returns>
 public static double HorizontalAlignmentRatio(this BringIntoViewRequestedEventArgs e) => Resolver.HorizontalAlignmentRatio(e);
 /// <summary>
 /// Gets the Rect in the TargetElement’s coordinate space to bring into view.
 /// </summary>
 /// <param name="e">The requested <see cref="BringIntoViewRequestedEventArgs"/>.</param>
 /// <returns>The Rect in the TargetElement’s coordinate space to bring into view.</returns>
 public static Rect TargetRect(this BringIntoViewRequestedEventArgs e) => Resolver.TargetRect(e);
 /// <summary>
 /// Gets a value that specifies whether the scrolling should be animated.
 /// </summary>
 /// <param name="e">The requested <see cref="BringIntoViewRequestedEventArgs"/>.</param>
 /// <returns><c>true</c> to animate the scrolling; otherwise, <c>false</c>.</returns>
 public static bool AnimationDesired(this BringIntoViewRequestedEventArgs e) => Resolver.AnimationDesired(e);
 /// <summary>
 /// Gets the element that should be made visible in response to the event.
 /// </summary>
 /// <param name="e">The requested <see cref="BringIntoViewRequestedEventArgs"/>.</param>
 /// <returns>The element that should be made visible in response to the event.</returns>
 public static UIElement TargetElement(this BringIntoViewRequestedEventArgs e) => Resolver.TargetElement(e);
 void IBringIntoViewRequestedEventArgsResolver.TargetRect(BringIntoViewRequestedEventArgs e, Rect targetRect) => e.TargetRect = targetRect;
 Rect IBringIntoViewRequestedEventArgsResolver.TargetRect(BringIntoViewRequestedEventArgs e) => e.TargetRect;
 void IBringIntoViewRequestedEventArgsResolver.AnimationDesired(BringIntoViewRequestedEventArgs e, bool animationDesired) => e.AnimationDesired = animationDesired;
 bool IBringIntoViewRequestedEventArgsResolver.AnimationDesired(BringIntoViewRequestedEventArgs e) => e.AnimationDesired;
 void IBringIntoViewRequestedEventArgsResolver.TargetElement(BringIntoViewRequestedEventArgs e, UIElement targetElement) => e.TargetElement = targetElement;
 UIElement IBringIntoViewRequestedEventArgsResolver.TargetElement(BringIntoViewRequestedEventArgs e) => e.TargetElement;
 /// <summary>
 /// Gets a reference to the object that raised the event.
 /// This is often a template part of a control rather than an element that was declared in your app UI.
 /// </summary>
 /// <param name="e">The requested <see cref="BringIntoViewRequestedEventArgs"/>.</param>
 /// <returns>The object that raised the event.</returns>
 public static object OriginalSource(this BringIntoViewRequestedEventArgs e) => Resolver.OriginalSource(e);
 void IBringIntoViewRequestedEventArgsResolver.Handled(BringIntoViewRequestedEventArgs e, bool handled) => e.Handled = handled;
 object IBringIntoViewRequestedEventArgsResolver.OriginalSource(BringIntoViewRequestedEventArgs e) => e.OriginalSource;
 double IBringIntoViewRequestedEventArgsResolver.HorizontalAlignmentRatio(BringIntoViewRequestedEventArgs e) => e.HorizontalAlignmentRatio;
 /// <summary>
 /// Sets the element that should be made visible in response to the event.
 /// </summary>
 /// <param name="e">The requested <see cref="BringIntoViewRequestedEventArgs"/>.</param>
 /// <param name="targetElement">The element that should be made visible in response to the event.</param>
 public static void TargetElement(this BringIntoViewRequestedEventArgs e, UIElement targetElement) => Resolver.TargetElement(e, targetElement);
 double IBringIntoViewRequestedEventArgsResolver.VerticalAlignmentRatio(BringIntoViewRequestedEventArgs e) => e.VerticalAlignmentRatio;
 /// <summary>
 /// Sets a value that specifies whether the scrolling should be animated.
 /// </summary>
 /// <param name="e">The requested <see cref="BringIntoViewRequestedEventArgs"/>.</param>
 /// <param name="animationDesired"><c>true</c> to animate the scrolling; otherwise, <c>false</c>.</param>
 public static void AnimationDesired(this BringIntoViewRequestedEventArgs e, bool animationDesired) => Resolver.AnimationDesired(e, animationDesired);
 double IBringIntoViewRequestedEventArgsResolver.HorizontalOffset(BringIntoViewRequestedEventArgs e) => e.HorizontalOffset;
 /// <summary>
 /// Sets the Rect in the TargetElement’s coordinate space to bring into view.
 /// </summary>
 /// <param name="e">The requested <see cref="BringIntoViewRequestedEventArgs"/>.</param>
 /// <param name="targetRect">The Rect in the TargetElement’s coordinate space to bring into view.</param>
 public static void TargetRect(this BringIntoViewRequestedEventArgs e, Rect targetRect) => Resolver.TargetRect(e, targetRect);
 void IBringIntoViewRequestedEventArgsResolver.HorizontalOffset(BringIntoViewRequestedEventArgs e, double horizontalOffset) => e.HorizontalOffset = horizontalOffset;
 /// <summary>
 /// Gets the vertical distance that should be added to the viewport-relative position of the TargetRect
 /// after satisfying the requested VerticalAlignmentRatio.
 /// </summary>
 /// <param name="e">The requested <see cref="BringIntoViewRequestedEventArgs"/>.</param>
 /// <returns>
 /// The vertical distance that should be added to the viewport-relative position of the TargetRect
 /// after satisfying the requested VerticalAlignmentRatio.
 /// </returns>
 public static double VerticalAlignmentRatio(this BringIntoViewRequestedEventArgs e) => Resolver.VerticalAlignmentRatio(e);
 double IBringIntoViewRequestedEventArgsResolver.VerticalOffset(BringIntoViewRequestedEventArgs e) => e.VerticalOffset;
 void IBringIntoViewRequestedEventArgsResolver.VerticalOffset(BringIntoViewRequestedEventArgs e, double verticalOffset) => e.VerticalOffset = verticalOffset;
 bool IBringIntoViewRequestedEventArgsResolver.Handled(BringIntoViewRequestedEventArgs e) => e.Handled;
Exemple #29
0
 protected override void OnBringIntoViewRequested(BringIntoViewRequestedEventArgs e)
 {
     base.OnBringIntoViewRequested(e);
 }
 /// <summary>
 /// Gets a value that marks the routed event as handled. A <c>true</c> value prevents most handlers
 /// along the event route from handling the same event again.
 /// </summary>
 /// <param name="e">The requested <see cref="BringIntoViewRequestedEventArgs"/>.</param>
 /// <returns>
 /// <c>true</c> to mark the routed event handled. <c>false</c> to leave the routed event unhandled,
 /// which permits the event to potentially route further and be acted on by other handlers.
 /// The default is <c>false</c>.
 /// </returns>
 public static bool Handled(this BringIntoViewRequestedEventArgs e) => Resolver.Handled(e);