wpf 我想放大图片,并且当图片放大到一定的程度后,显示滚动条,现在怎么样也不能实现显示滚动条,急求啊
<ScrollViewerName="scro_image"HorizontalScrollBarVisibility="Auto"VerticalScrollBarVi...
<ScrollViewer Name="scro_image" HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto" >
<Image x:Name="img_Questiontest" >
<Image.LayoutTransform>
<TransformGroup>
<ScaleTransform x:Name="preview_scaletransform" />
<TranslateTransform x:Name="preview_translatetransform"/>
</TransformGroup>
</Image.LayoutTransform>
</Image>
放大事件
/// <summary>
/// 图片放大
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void btn_BlowUp_Click(object sender, RoutedEventArgs e)
{
this.cn_QuestionImg_preview.RenderTransformOrigin = new Point(0.5, 0.5);
this.QuestiondImageZoom = 30;
} 展开
VerticalScrollBarVisibility="Auto" >
<Image x:Name="img_Questiontest" >
<Image.LayoutTransform>
<TransformGroup>
<ScaleTransform x:Name="preview_scaletransform" />
<TranslateTransform x:Name="preview_translatetransform"/>
</TransformGroup>
</Image.LayoutTransform>
</Image>
放大事件
/// <summary>
/// 图片放大
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void btn_BlowUp_Click(object sender, RoutedEventArgs e)
{
this.cn_QuestionImg_preview.RenderTransformOrigin = new Point(0.5, 0.5);
this.QuestiondImageZoom = 30;
} 展开
- 你的回答被采纳后将获得:
- 系统奖励15(财富值+成长值)+难题奖励10(财富值+成长值)+提问者悬赏20(财富值+成长值)
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询