WPF使用样式更新ArcGis InfoWindow外观代码
<Style x:Key="mainInfoWindowStyleMF" TargetType="{x:Type esri:InfoWindow}">
<Setter Property="Background" Value="Red"/>
<Setter Property="BorderBrush" Value="Blue"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="VerticalAlignment" Value="Top"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="Margin" Value="0,20,0,0"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type esri:InfoWindow}">
<Grid x:Name="Root" Height="{TemplateBinding Height}" RenderTransformOrigin="{Binding RenderTransformOrigin, RelativeSource={RelativeSource TemplatedParent}}" SnapsToDevicePixels="True">
<Grid.RenderTransform>
<ScaleTransform ScaleY="0" ScaleX="0"/>
</Grid.RenderTransform>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Show">
<Storyboard>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" Storyboard.TargetName="Root">
<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="1">
<EasingDoubleKeyFrame.EasingFunction>
<BackEase Amplitude="0.5" EasingMode="EaseOut"/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="Root">
<EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="1">
<EasingDoubleKeyFrame.EasingFunction>
<BackEase Amplitude="0.5" EasingMode="EaseOut"/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Hide">
<Storyboard>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" Storyboard.TargetName="Root">
<EasingDoubleKeyFrame KeyTime="0:0:0.25" Value="0">
<EasingDoubleKeyFrame.EasingFunction>
<CircleEase EasingMode="EaseIn"/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" Storyboard.TargetName="Root">
<EasingDoubleKeyFrame KeyTime="0:0:0.25" Value="0">
<EasingDoubleKeyFrame.EasingFunction>
<CircleEase EasingMode="EaseIn"/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups> <Grid.RowDefinitions>
<RowDefinition Height="2*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Border Grid.Row="0" BorderBrush="Red" BorderThickness="0" CornerRadius="30">
<Border.Background>
<ImageBrush ImageSource="images\baseUC\32.png" Viewport="0,0 1,1" ViewportUnits="Absolute" TileMode="FlipXY"></ImageBrush>
</Border.Background>
<ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Margin="{TemplateBinding Padding}"/>
</Border>
<Image Grid.Row="1" Source="images\baseUC\cor.png" VerticalAlignment="Top" HorizontalAlignment="Left"></Image>
<Path x:Name="BorderPath"/>
<!--Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding StrokeThickness}" StrokeLineJoin="Round"-->
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style> 使用:
<esri:InfoWindow x:Name="InfoWinMF"
Placement="TopRight"
Padding="15"
Map="{Binding ElementName=mainmap}"
ContentTemplate="{StaticResource GeneralDataTemplate}"
Style="{DynamicResource mainInfoWindowStyleMF}"
Width="1400"
Height="1000"
/>
WPF使用样式更新ArcGis InfoWindow外观代码的更多相关文章
- 如何在WPF程序中使用ArcGIS Engine的控件
原文 http://www.gisall.com/html/47/122747-4038.html WPF(Windows Presentation Foundation)是美国微软公司推出.NET ...
- WPF个人助手更新
大家好,这次更新主要是去除一些无关的功能,界面做了很大的调整,以前都是自己写的 UI ,最近也引入了 WPF-UI ,挺不错的,特此表示感谢,也希望大家会喜欢,别的也就不多说了,本软件以实用性为主,采 ...
- 自定义WPF 窗口样式
原文:自定义WPF 窗口样式 Normal 0 false 7.8 pt 0 2 false false false EN-US ZH-CN X-NONE 自定义 Window 在客户端程序中,经常需 ...
- 求助 WPF ListViewItem样式问题
求助 WPF ListViewItem样式问题 .NET 开发 > Windows Presentation Foundation Вопрос 0 Нужно войти <Style ...
- WPF多线程UI更新——两种方法
WPF多线程UI更新——两种方法 前言 在WPF中,在使用多线程在后台进行计算限制的异步操作的时候,如果在后台线程中对UI进行了修改,则会出现一个错误:(调用线程无法访问此对象,因为另一个线程拥有该对 ...
- WPF中动态更新TextBlock文字中的超链接,文本
1.------------------------------------------------------------------------- 修改超链接的文本文字: <TextBloc ...
- WPF GroupBox 样式分享
原文:WPF GroupBox 样式分享 默认样式 GroupBox 样式分享" title="WPF GroupBox 样式分享"> 添加样式后 GroupBox ...
- WPF DataGrid 样式设置
隔行换色,鼠标单击,悬浮样式都有,其具体效果如图 1 所示. 图 1 WPF DataGrid 样式设置效果图 其中: 界面设计代码下所示 ? + 查看代码 1 2 3 4 5 6 7 8 9 10 ...
- WPF DataGrid 样式分享
原文:WPF DataGrid 样式分享 隔行换色,鼠标单击,悬浮样式都有 先看效果: 代码: <DataGrid AutoGenerateColumns="False" N ...
随机推荐
- vue环境搭建简介
简单整理下vue的安装的新建项目 安装node.js和npm 参考其他教程 安装vue npm install vue 安装脚手架 vue-cli npm install --global vue-c ...
- github常用项目汇总
1.smartTable(智能表格) android自动生成表格框架 使用方法:在github中搜索smartTable 进入项目后,查看开源项目的介绍和使用方法即可.
- 【杂题】[LibreOJ 2541] 【PKUWC2018】猎人杀【生成函数】【概率与期望】
Description 猎人杀是一款风靡一时的游戏"狼人杀"的民间版本,他的规则是这样的: 一开始有 n个猎人,第 i 个猎人有仇恨度 wi.每个猎人只有一个固定的技能:死亡后必须 ...
- [Re:从零开始的分布式] 0.x——分布式锁概述
为什么需要分布式锁 Martin Kleppmann是英国剑桥大学的分布式系统的研究员,Martin认为一般我们使用分布式锁有两个场景: 效率:使用分布式锁可以避免不同节点重复相同的工作,这些工作会浪 ...
- [转] CDH6 安装文章链接收集
CentOS 7下Cloudera Manager及CDH 6.0.1安装过程详解 http://blog.51cto.com/wzlinux/2321433?source=dra Cloudera ...
- 网站变灰css
html{ filter: grayscale(100%); -webkit-filter: grayscale(100%); -moz-filter: grayscale(100%); -ms-fi ...
- guava学习:guava集合类型-table
最近学习了下guava的使用,这里简单记录下一些常用并且使用的工具类把. 看到table的使用时候真的是眼前一亮,之前的代码中写过很多的Map<String,Map<String,Stri ...
- DataGridView 隔行显示不同的颜色
两种方法 第一种 DataGridview1.Rows[i].DefultCellStyle.backcolor 第二种 AlternatingRowsDefutCellstyle 属性 获取或设置应 ...
- php 在函数前面加个@的作用
@是错误控制运算符,用屏蔽错误提示比如:@mysql_connect() 不会出现Warning, 而原来mysql_connect 会在页面上访提示Warning.主要是高版本的php不在支持mys ...
- spring mybatis 关于 basepackage 和 mapperLocations 的通配符匹配实例
SqlSessionFactoryBean mapperLocations 注意下面几点 classpath* mapperLocation 起始路径不能有 * ,如 dm* 就不行 ** list ...