首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Uwp图像缩放

Uwp图像缩放
EN

Stack Overflow用户
提问于 2018-04-20 09:15:34
回答 1查看 1.1K关注 0票数 0

我正在尝试使用RenderTransform在网格视图项中缩放图像。缩放已成功执行,但缩放图像在网格视图项后面。如何把它摆在前面。

代码语言:javascript
复制
<VisualState x:Name="PointerOver">
 <Storyboard  >
  <DoubleAnimation Duration="0" Storyboard.TargetName="BorderRectangle" 
   Storyboard.TargetProperty="Opacity" To="1" />
    <ObjectAnimationUsingKeyFrames  
      Storyboard.TargetName="contentborderscale" 
      Storyboard.TargetProperty="ScaleY" >
       <DiscreteObjectKeyFrame KeyTime="0" Value="2" />
   </ObjectAnimationUsingKeyFrames>
   <ObjectAnimationUsingKeyFrames Storyboard.TargetName="contentborderscale" 
    Storyboard.TargetProperty="ScaleX">
     <DiscreteObjectKeyFrame  KeyTime="0" Value="2"  />
   </ObjectAnimationUsingKeyFrames>
   <PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter" />
 </Storyboard>
</VisualState>
EN

回答 1

Stack Overflow用户

发布于 2018-04-21 19:40:03

简而言之,您希望缩放GridViewItem的容器。

我检查了我对GridView selectedItem Popup (Method 2)的回答

方法2:在指针Hover上 XAML部件 C#部件 私有FrameworkElement lastPopUpElement = null;私有GridView_PointerEntered(对象发送方,PointerRoutedEventArgs e) { lastPopUpElement =lastPopUpElement= FrameworkElement)为FrameworkElement;Canvas.SetZIndex (lastPopUpElement,1);lastPopUpElement.Scale(scaleX: 1.5f,scaleY: 1.5f,centerX: 50,centerY: 50,easingType: centerX)centerX();}私有空(对象发送方,#e 20# e) { if ( !=空){(,0);lastPopUpElement.Scale(centerX: 50,centerY: 50,easingType: EasingType.Sine).Start();}} 样本输出

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49938159

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档