http://www.jb51.net/article/98384.htm

1.wpf远程显示原图:

Stretch="Fill"

  1. string enterImgPath = "远程地址" + @".//EnterCarPic\05-03\test.jpg" + "&w=" + + "&h=" + ;

主要是因为那个950和650,据显示位置大小给予

2.当前主页面:Application.Current.MainWindow引用程序的主窗口(几个主窗口另当别论)

http://www.cnblogs.com/tsliwei/p/6212162.html

3.工具栏

  1. <ToolBar Height="" Background="#343536" DockPanel.Dock="Top" >
  2.  
  3. <Button Tag="月卡查询" Name="YKCX">
  4. <StackPanel >
  5. <Border BorderBrush="White" BorderThickness="0,0,0,1" CornerRadius="" Width="" Height="">
  6. <Button x:Name="btn_DisCountCardInfo" ToolTip="月卡查询" Style="{DynamicResource SystemButton}" Click="btn_DisCountCardInfo_Click" >
  7. <!-- Click=""-->
  8. <Button.Background>
  9. <ImageBrush ImageSource="images/fax.ico"></ImageBrush>
  10. </Button.Background>
  11. </Button>
  12.  
  13. </Border>
  14. <!-- <ToolBar >
  15. <Menu DockPanel.Dock="Top">
  16. <MenuItem Header="查看信息" >
  17. <MenuItem Header="打开">
  18. <MenuItem Header="1.txt"></MenuItem>
  19. <MenuItem Header="2.txt"></MenuItem>
  20. <MenuItem Header="3.txt"></MenuItem>
  21. </MenuItem>
  22. <MenuItem Header="退出" Name="miExit2"></MenuItem>
  23. </MenuItem>
  24. </Menu>
  25. </ToolBar>-->
  26. <TextBlock FontSize="" HorizontalAlignment="Center" VerticalAlignment="Bottom" >
  27. <TextBlock.Text>月卡查询</TextBlock.Text>
  28. <TextBlock.Foreground>
  29. <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
  30. <GradientStop Color="Gray" Offset="0.0" />
  31. <GradientStop Color="Gray" Offset="1.0" />
  32. </LinearGradientBrush>
  33. </TextBlock.Foreground>
  34. </TextBlock>
  35. </StackPanel>
  36.  
  37. </Button>
  38. <Separator></Separator>
  39.  
  40. <Button Tag="VIP卡查询" Name="VIPCQ" Visibility="Collapsed">
  41. <StackPanel >
  42. <Border BorderBrush="White" BorderThickness="0,0,0,1" CornerRadius="" Width="" Height="">
  43. <Button x:Name="btn_DisCountCardInfo2" ToolTip="VIP卡查询" Style="{DynamicResource SystemButton}" >
  44. <!-- Click=""-->
  45. <Button.Background>
  46. <ImageBrush ImageSource="images/fax.ico"></ImageBrush>
  47. </Button.Background>
  48. </Button>
  49. </Border>
  50. <TextBlock FontSize="" HorizontalAlignment="Center" VerticalAlignment="Bottom" >
  51. <TextBlock.Text>VIP卡查询</TextBlock.Text>
  52. <TextBlock.Foreground>
  53. <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
  54. <GradientStop Color="Gray" Offset="0.0" />
  55. <GradientStop Color="Gray" Offset="1.0" />
  56. </LinearGradientBrush>
  57. </TextBlock.Foreground>
  58. </TextBlock>
  59. </StackPanel>
  60. </Button>
  61. <Separator Name="sptor_VIPCardQuery" Visibility="Collapsed"></Separator>
  62.  
  63. <Button Tag="交接班" Name="JJB">
  64. <StackPanel >
  65. <Border BorderBrush="White" BorderThickness="0,0,0,1" CornerRadius="" Width="" Height="">
  66. <Button x:Name="btn_DisCountCardInfo3" ToolTip="交接班" Style="{DynamicResource SystemButton}" >
  67. <!-- Click=""-->
  68. <Button.Background>
  69. <ImageBrush ImageSource="images/fax.ico"></ImageBrush>
  70. </Button.Background>
  71. </Button>
  72. </Border>
  73. <TextBlock FontSize="" HorizontalAlignment="Center" VerticalAlignment="Bottom" >
  74. <TextBlock.Text>交接班</TextBlock.Text>
  75. <TextBlock.Foreground>
  76. <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
  77. <GradientStop Color="Gray" Offset="0.0" />
  78. <GradientStop Color="Gray" Offset="1.0" />
  79. </LinearGradientBrush>
  80. </TextBlock.Foreground>
  81. </TextBlock>
  82. </StackPanel>
  83. </Button>
  84. <Separator></Separator>
  85.  
  86. <Button Tag="收费情况" Name="收费情况">
  87. <StackPanel >
  88. <Border BorderBrush="White" BorderThickness="0,0,0,1" CornerRadius="" Width="" Height="">
  89. <Button x:Name="btn_DisCountCardInfo4" ToolTip="收费情况" Style="{DynamicResource SystemButton}" >
  90. <!-- Click=""-->
  91. <Button.Background>
  92. <ImageBrush ImageSource="images/fax.ico"></ImageBrush>
  93. </Button.Background>
  94. </Button>
  95. </Border>
  96. <TextBlock FontSize="" HorizontalAlignment="Center" VerticalAlignment="Bottom" >
  97. <TextBlock.Text>收费情况</TextBlock.Text>
  98. <TextBlock.Foreground>
  99. <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
  100. <GradientStop Color="Gray" Offset="0.0" />
  101. <GradientStop Color="Gray" Offset="1.0" />
  102. </LinearGradientBrush>
  103. </TextBlock.Foreground>
  104. </TextBlock>
  105. </StackPanel>
  106. </Button>
  107. <Separator></Separator>
  108. <Button Tag="设置" Name="设置">
  109. <StackPanel >
  110. <Border BorderBrush="White" BorderThickness="0,0,0,1" CornerRadius="" Width="" Height="">
  111. <Button x:Name="btn_DisCountCardInfo5" ToolTip="设置" Style="{DynamicResource SystemButton}" >
  112. <!-- Click=""-->
  113. <Button.Background>
  114. <ImageBrush ImageSource="images/fax.ico"></ImageBrush>
  115. </Button.Background>
  116. </Button>
  117. </Border>
  118. <TextBlock FontSize="" HorizontalAlignment="Center" VerticalAlignment="Bottom" >
  119. <TextBlock.Text>设置</TextBlock.Text>
  120. <TextBlock.Foreground>
  121. <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
  122. <GradientStop Color="Gray" Offset="0.0" />
  123. <GradientStop Color="Gray" Offset="1.0" />
  124. </LinearGradientBrush>
  125. </TextBlock.Foreground>
  126. </TextBlock>
  127. </StackPanel>
  128. </Button>
  129. <Separator></Separator>
  130. <Button Tag="修改密码" Name="修改密码">
  131. <StackPanel >
  132. <Border BorderBrush="White" BorderThickness="0,0,0,1" CornerRadius="" Width="" Height="">
  133. <Button x:Name="btn_DisCountCardInfo6" ToolTip="修改密码" Style="{DynamicResource SystemButton}" >
  134. <!-- Click=""-->
  135. <Button.Background>
  136. <ImageBrush ImageSource="images/fax.ico"></ImageBrush>
  137. </Button.Background>
  138. </Button>
  139. </Border>
  140. <TextBlock FontSize="" HorizontalAlignment="Center" VerticalAlignment="Bottom" >
  141. <TextBlock.Text>修改密码</TextBlock.Text>
  142. <TextBlock.Foreground>
  143. <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
  144. <GradientStop Color="Gray" Offset="0.0" />
  145. <GradientStop Color="Gray" Offset="1.0" />
  146. </LinearGradientBrush>
  147. </TextBlock.Foreground>
  148. </TextBlock>
  149. </StackPanel>
  150. </Button>
  151. <Separator></Separator>
  152. <Button Tag="关于" Name="关于">
  153. <StackPanel >
  154. <Border BorderBrush="White" BorderThickness="0,0,0,1" CornerRadius="" Width="" Height="">
  155. <Button x:Name="btn_DisCountCardInfo7" ToolTip="关于" Style="{DynamicResource SystemButton}" >
  156. <!-- Click=""-->
  157. <Button.Background>
  158. <ImageBrush ImageSource="images/fax.ico"></ImageBrush>
  159. </Button.Background>
  160. </Button>
  161. </Border>
  162. <TextBlock FontSize="" HorizontalAlignment="Center" VerticalAlignment="Bottom" >
  163. <TextBlock.Text>关于</TextBlock.Text>
  164. <TextBlock.Foreground>
  165. <LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
  166. <GradientStop Color="Gray" Offset="0.0" />
  167. <GradientStop Color="Gray" Offset="1.0" />
  168. </LinearGradientBrush>
  169. </TextBlock.Foreground>
  170. </TextBlock>
  171. </StackPanel>
  172. </Button>
  173. </ToolBar>
  174. <!--<ToolBar DockPanel.Dock="Top" Height="" >
  175. <Image Source="images/fax.ico" Width=""></Image>
  176. <Button Tag="现金收费" >
  177. <Image Source="images/fax.ico" ></Image>
  178.  
  179. </Button>
  180.  
  181. <Border BorderBrush="SteelBlue" >
  182.  
  183. <Button Content=" hhhhhhhhh" >
  184.  
  185. </Button>
  186. </Border>
  187. <Menu DockPanel.Dock="Top">
  188. <MenuItem Header="文件">
  189. <MenuItem Header="打开">
  190. <MenuItem Header="1.txt"></MenuItem>
  191. <MenuItem Header="2.txt"></MenuItem>
  192. <MenuItem Header="3.txt"></MenuItem>
  193. </MenuItem>
  194. <MenuItem Header="退出" Name="miExit2" Click="miExit_Click"></MenuItem>
  195. </MenuItem>
  196. <MenuItem Header="编辑">
  197. <MenuItem Header="复制"></MenuItem>
  198. <MenuItem Header="粘贴"></MenuItem>
  199. </MenuItem>
  200. </Menu>
  201. <Button>
  202. <Image Source="images/fax.ico"></Image>
  203. </Button>
  204.  
  205. </ToolBar>-->

4.一个Window页面的元素适用一个效果:

  1. <Window.Resources>
  2. <Style TargetType="目标标签名称">
  3. <Style.Triggers>
  4. <Trigger Property="IsMouseOver" Value="True">
  5. <Setter Property="Background" Value="#000000" />
  6. </Trigger>
  7. </Style.Triggers>
  8. </Style>
  9.  
  10. </Window.Resources>

WPF 远程显示原图 当前主页面 工具栏 一个Window页面的元素适用一个效果的更多相关文章

  1. WPF: 针对Windows 8优化菜单栏和工具栏

    原文 WPF: 针对Windows 8优化菜单栏和工具栏 目录 1. 关于菜单图标大小 2. 关于IsEnabled和工具栏图标 3. 针对.NET 3.x的菜单栏和工具栏外观 返回目录 1. 关于菜 ...

  2. WPF 图片显示中的保留字符问题

    在WPF中显示一张图片,本是一件再简单不过的事情.一张图片,一行XAML代码即可. 但是前段时间遇到了一件奇怪的事: 开发机上运行正常的程序,在某些客户机器上却显示不了图片,而且除了这个问题,其它运行 ...

  3. 【转帖】远程显示(操作) 服务器 GUI 程序(图形化界面) (基于 X11 Forwarding + Centos + MobaXterm)

    远程显示(操作) 服务器 GUI 程序(图形化界面) (基于 X11 Forwarding + Centos + MobaXterm) https://zhuanlan.zhihu.com/p/310 ...

  4. 远程显示(操作) 服务器 GUI 程序(图形化界面) (基于 X11 Forwarding + Centos + MobaXterm)

    在做 数据分析(数据挖掘 或 机器学习)的时候,我们经常需要绘制一些统计相关的图表,这些统计.绘图的程序常常是跑在服务器上的,可是服务器出于性能和效率的考虑,通常都是没有安装图形化界面的,于是这些统计 ...

  5. 在WPF中显示动态GIF

    在我们寻求帮助的时候,最不愿意听到的答复是:很抱歉,在当前版本的产品中还没有实现该功能... 在WPF中显示动态的GIF图像时便遇到了这样的问题,WPF中强大的Image控件却不支持动态的GIF(其只 ...

  6. 解决配置Ubuntu中vnc远程显示灰屏

    解决配置Ubuntu中vnc远程显示灰屏a. 缺失图形化工具b.  ~/.vnc/xstartup 权限不对1. Ubuntu 16.04 安装 VNC 及 Mate 桌面环境https://www. ...

  7. WPF 小矢量图 : 主页,返回,加,减,文字按钮,左移,右移

    原文:WPF 小矢量图 : 主页,返回,加,减,文字按钮,左移,右移 代码:: <UserControl x:Class="SQ.TestPage" xmlns=" ...

  8. WPF 循环显示列表

    原文:WPF 循环显示列表 版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/SANYUNI/article/details/79423707 项目需要 ...

  9. WPF 窗体显示最前端

    原文:WPF 窗体显示最前端 版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/jjx0224/article/details/8782845 如何做一 ...

随机推荐

  1. idea 使用过程中的一些设置记录

    1.XML sql底色 在mapper文件中,SQL出现黄色的底色. ** settings ** > ** inspections ** 去掉 ** SQL ** 中的 ** No data ...

  2. 嵌套的frame

    自动化的测试中,iframe的嵌套也是很常见的,对于嵌套的iframe,我们处理的方式是先进入到iframe的父节点, 再进入到子节点,然后可以对子节点里面的对象进行处理和操作.如下的html代码效果 ...

  3. 【EWM系列】SAP EWM中仓库任务WT创建的函数

    公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[EWM系列]SAP EWM中仓库任务WT创建的 ...

  4. 【Qt开发】解决Qt5.7.0中文显示乱码的问题

    [Qt开发]解决Qt5.7.0中文显示乱码的问题 亲测可用: 乱码主要是编码格式的问题,这里可以通过Edit菜单中选择当前文档的编码方式,选择按照UTF-8格式保存,然后输入对应的中文,保存,然后运行 ...

  5. 一、Zabbix-学习列表

    近期本人在求职,面试了几家,觉得监控是一个很重要的事情,所以决定深入学习一下监控.目前的监控系统有很多,Zabbix是目前应用最广泛的开源监控之一,功能比较完善,所以决定学习一下. 目前将学习zabb ...

  6. 复制/etc目录下所有以p开头,以非数字结尾的文件或目录到/tmp/mytest1目录中

    cp -r /etc/p*[a-Z] /tmp/mytest1

  7. Nginx日志监控 使用 goaccess查看nginx日志

    nginx日志监控 yum install goaccess   安装使用教程 goaccess access.log -o ../html/report.html --real-time-html ...

  8. mysql(5.6及以下)解析json

    转自:https://blog.csdn.net/weixin_33979203/article/details/87621768 #json解析函数 DELIMITER $$ DROP FUNCTI ...

  9. CAS单点登录系统入门--分布式登录验证

    1.开源单点登录系统CAS入门 1.1 什么是单点登录 单点登录(Single Sign On),简称为 SSO,是目前比较流行的企业业务整合的解决方案之一.SSO的定义是在多个应用系统中,用户只需要 ...

  10. centos7使用kubeadm搭建kubernetes集群

    一.本地实验环境准备 服务器虚拟机准备 IP CPU 内存 hostname 192.168.222.129 >=2c >=2G master 192.168.222.130 >=2 ...