<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外观代码的更多相关文章

  1. 如何在WPF程序中使用ArcGIS Engine的控件

    原文 http://www.gisall.com/html/47/122747-4038.html WPF(Windows Presentation Foundation)是美国微软公司推出.NET ...

  2. WPF个人助手更新

    大家好,这次更新主要是去除一些无关的功能,界面做了很大的调整,以前都是自己写的 UI ,最近也引入了 WPF-UI ,挺不错的,特此表示感谢,也希望大家会喜欢,别的也就不多说了,本软件以实用性为主,采 ...

  3. 自定义WPF 窗口样式

    原文:自定义WPF 窗口样式 Normal 0 false 7.8 pt 0 2 false false false EN-US ZH-CN X-NONE 自定义 Window 在客户端程序中,经常需 ...

  4. 求助 WPF ListViewItem样式问题

    求助 WPF ListViewItem样式问题 .NET 开发 > Windows Presentation Foundation Вопрос 0 Нужно войти <Style ...

  5. WPF多线程UI更新——两种方法

    WPF多线程UI更新——两种方法 前言 在WPF中,在使用多线程在后台进行计算限制的异步操作的时候,如果在后台线程中对UI进行了修改,则会出现一个错误:(调用线程无法访问此对象,因为另一个线程拥有该对 ...

  6. WPF中动态更新TextBlock文字中的超链接,文本

    1.------------------------------------------------------------------------- 修改超链接的文本文字: <TextBloc ...

  7. WPF GroupBox 样式分享

    原文:WPF GroupBox 样式分享 默认样式 GroupBox 样式分享" title="WPF GroupBox 样式分享"> 添加样式后 GroupBox ...

  8. WPF DataGrid 样式设置

    隔行换色,鼠标单击,悬浮样式都有,其具体效果如图 1 所示. 图 1 WPF DataGrid 样式设置效果图 其中: 界面设计代码下所示 ? + 查看代码 1 2 3 4 5 6 7 8 9 10 ...

  9. WPF DataGrid 样式分享

    原文:WPF DataGrid 样式分享 隔行换色,鼠标单击,悬浮样式都有 先看效果: 代码: <DataGrid AutoGenerateColumns="False" N ...

随机推荐

  1. PXE+Kickstart 批量安装CentOS 7

    安装之前 将需要安装 CentOS 的服务器与 PXE 服务器通过网络设备连接:PXE 服务器安装 CentOS,并且关闭firewalld.selinux,设置静态IP地址,本例设为10.0.0.1 ...

  2. Webpack学习错误解决笔记

    错误1:在用npm install 安装模块时,时常会出现没有以下类似的错误 解决方法:右键点击node_modules文件夹,选取属性,将文件夹只读选项去除 错误2:在学习到清理/dist文件夹这块 ...

  3. 利用CompletableFuture优化程序的执行效率

    一.线程池的Future模式 在了解java8的CompletableFuture之前,先通过Future来解决一个问题,看个例子: 假设现在有一个网站,首页有顶部Banner位.左边栏.右边栏.用户 ...

  4. windows 下 pyinstaller distutils not included with latest virtualenv (16.4.0)

    起因 因为windows下python3.7.2内置venv虚拟环境下pyinstaller错误问题,切换virtualenv但是发现最新版本又有其他问题 - -! ModuleNotFoundErr ...

  5. 在Windows Server 2008 R2(x64)上安装.NET Framework 4.5 兼谈.NET Framework 4.0 “在服务器核心角色上不受支持”含义

    完成了一个服务器文件监控系统,该系统的核心是一个Windows服务,需要安装在服务器上.由于是Visual Studio 2012开发,为了保证开发的Windows服务可以运行,必须在Windows服 ...

  6. android studio ndk 开发入门

    ndk 开发没什么神秘的ndk 说白了就是一个交叉编译的工具链,用它来生成各个CPU架构下的静态或动态链接库,linux 下就是 .a 和 .so 文件.原理就是 java 通过 JNI 和 C.C+ ...

  7. python-thread封装类创建线程

    #!/usr/bin/python #coding=utf-8 from time import ctime,sleep import threading class Mythead(threadin ...

  8. ubuntu18.04 安装docker

    https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce-1Change "stable" ...

  9. gcc对open(2)支持重载吗

    在Linux中,如果man -s2 open, 我们看到两种不同的函数原型声明: $ man -s2 open NAME open, creat - open and possibly create ...

  10. PTA (Advanced Level) 1016 Phone Bills

    Phone Bills A long-distance telephone company charges its customers by the following rules: Making a ...