xaml

Add a PDF viewer to a WPF application

空扰寡人 提交于 2020-02-18 05:06:44
问题 I am new to WPF, and am trying to add a PDF viewer to my WPF application, but can't seem to work out how to do it... I have tried following a couple of tutorials/ examples that I have found online, but they don't seem to work for me for varying reasons... For example, I tried following the tutorial at: https://documentation.devexpress.com/#WPF/CustomDocument114328 to add a PDF Viewer at Design Time- it says to drag the PdfViewerControl from the DX.15.2: Data & Analytics Toolbox tab and drop

Add a PDF viewer to a WPF application

岁酱吖の 提交于 2020-02-18 05:06:30
问题 I am new to WPF, and am trying to add a PDF viewer to my WPF application, but can't seem to work out how to do it... I have tried following a couple of tutorials/ examples that I have found online, but they don't seem to work for me for varying reasons... For example, I tried following the tutorial at: https://documentation.devexpress.com/#WPF/CustomDocument114328 to add a PDF Viewer at Design Time- it says to drag the PdfViewerControl from the DX.15.2: Data & Analytics Toolbox tab and drop

【WPF学习】第四十四章 图画

不想你离开。 提交于 2020-02-18 01:49:02
  通过上一章的学习,Geometry抽象类表示形状或路径。Drawing抽象类扮演了互补的角色,它表示2D图画(Drawing)——换句话说,它包含了显示矢量图像或位图需要的所有信息。   尽管有几类画图类,但只有GeometryDrawing类能使用已经学习过的几何图形。它增加了决定如何绘制图形的画笔和填充细节。可将GeometryDrawing对象视为矢量插图中的形状。例如,可将标准的窗口元文件格式(.wmf)转换成准备插入用户界面的GeometryDrawing对象的集合。   分析一个简单的示例有帮助的。前面已经看到了如何定义表示三角形的PathGeometry对象: <PathGeometry> <PathFigure IsClosed="True" StartPoint="0,100"> <LineSegment Point="100,100"/> <LineSegment Point="100,50"/> </PathFigure> </PathGeometry>   可使用PathGeometry对象创建GeometryDrawing对象,如下所示: <GeometryDrawing Brush="Yellow" > <GeometryDrawing.Pen> <Pen Brush="Blue" Thickness="3"></Pen> <

Win10 UWP开发系列:开发一个自定义控件——带数字徽章的AppBarButton

自古美人都是妖i 提交于 2020-02-16 13:00:27
最近有个项目有一个这样的需求,在文章浏览页底部有几个AppBarButton,其中有一个是评论按钮,需要在评论按钮上显示一个红色数字,类似微信的新消息提醒: 这种设计在iOS和Android平台都是很常见的,但UWP上并没有提供现成的控件。所以只能自己实现一个了。 做出来效果是这样的: 分析一下实现的思路。首先这还是一个AppBarButton,只是其中增加了一个数字徽章的显示,这个属性应该是可以绑定到其他属性的,如果绑定的值不为0,则显示数字,如果为0则隐藏数字。因此我们可以通过继承AppBarButton,并修改其模板来实现这个控件。 下面动手实践一下吧。我已经安装了最新的VS2017,不过使用VS2015的话也是差不多的。首先创建一个名为AppBarBadgeButtonSample的UWP项目: 选择在Blend中打开: 在页面上添加一个AppBar: 添加后是这样的结构: 然后需要将默认AppBarButton的模板导出来,给我们自定义的控件用。在按钮上右键选择编辑模板,编辑副本: 输入一个名字,为了简单起见我们就在当前文件中创建这个样式好了,点击确定。 切换到XAML模式,可以看到页面的XAML代码中添加了这样的资源: 这个就是AppBarButton的控件模板了。我们需要在这个默认模板的基础上,实现自定义的AppBarBadgeButton。 现在返回到VS2017

Silverlight架构概述

主宰稳场 提交于 2020-02-16 04:56:43
1.Silverlight概述 Silverlight技术是一个跨浏览器跨平台的插件,可以用来实现丰富的媒体体验和丰富交互性体验的web应用。在编程模型方面: Silverlight1.0支持AJAX、.NET以及动态语言(Python/ruby)。Silverlight1.0利用现有的WEB技术(AJAX、Javascript、DHTML)来进行编程, Silverlight2.0则进入了动态语言和.NET语言的支持,并提供了更多的新特性,比如独立存储(Isolated Storage)、网络编程(NetWorking)以及各种各样丰富的控件。 Silverlight 3.0是最新版本的版本,它刚刚才在09年7月推出,有望成为富互联网平台的首选。这一最新版本的Silverlight具备三维图像支持以及将图像作业卸载到GPU的能力,从而为用户带来更顺畅,更快捷的体验。Silverlight为智能客户商业程序开发提供了强大功能,其网络部署和导航性能都非常棒。该工具代表着未来的开发选择,Silverlight应用程序将为网站应用开发带来新的局面。 更多简介: 关于Silverlight简介 1.Silverlight 1.0架构 Silverlight1.0的架构图如下图所示:在Silverlight1.0中,最主要的编程接口是基于Javascript文档对象模型(DOM)API的

How to make EntranceThemeTransition works on a Custom Panel & ItemsSource?

孤街浪徒 提交于 2020-02-16 02:41:26
问题 I can't get EntranceThemeTransition to work on a custom panel as ItemsPanelTemplate. See: Simplest code behind: public List<int> MyListExample = new List<int>() {0, 1, 2, 3, 4, 5}; Simplest XAML: <ListView Width="120" ItemsSource="{x:Bind MyListExample}"> <ListView.ItemContainerTransitions> <TransitionCollection> <EntranceThemeTransition FromVerticalOffset="200" IsStaggeringEnabled="True"/> </TransitionCollection> </ListView.ItemContainerTransitions> <ListView.ItemsPanel> <ItemsPanelTemplate>

How to make EntranceThemeTransition works on a Custom Panel & ItemsSource?

只愿长相守 提交于 2020-02-16 02:40:09
问题 I can't get EntranceThemeTransition to work on a custom panel as ItemsPanelTemplate. See: Simplest code behind: public List<int> MyListExample = new List<int>() {0, 1, 2, 3, 4, 5}; Simplest XAML: <ListView Width="120" ItemsSource="{x:Bind MyListExample}"> <ListView.ItemContainerTransitions> <TransitionCollection> <EntranceThemeTransition FromVerticalOffset="200" IsStaggeringEnabled="True"/> </TransitionCollection> </ListView.ItemContainerTransitions> <ListView.ItemsPanel> <ItemsPanelTemplate>

How to make EntranceThemeTransition works on a Custom Panel & ItemsSource?

回眸只為那壹抹淺笑 提交于 2020-02-16 02:38:30
问题 I can't get EntranceThemeTransition to work on a custom panel as ItemsPanelTemplate. See: Simplest code behind: public List<int> MyListExample = new List<int>() {0, 1, 2, 3, 4, 5}; Simplest XAML: <ListView Width="120" ItemsSource="{x:Bind MyListExample}"> <ListView.ItemContainerTransitions> <TransitionCollection> <EntranceThemeTransition FromVerticalOffset="200" IsStaggeringEnabled="True"/> </TransitionCollection> </ListView.ItemContainerTransitions> <ListView.ItemsPanel> <ItemsPanelTemplate>

XAML binding to CompositeCollection

不想你离开。 提交于 2020-02-15 06:41:12
问题 I have only one datagrid in a single view but the collections which are ItemsSource's of this datagrid are in different View Models. So is it possible to bind this single datagrid in view with the collections in two different View Models? For each row in the grid, display an item from one collection, and an item from the other collection..! to display all columns in one row. xaml: DataContext="{DynamicResource ViewModelCombine}"> <Window.Resources> <vm:ViewModelCombine x:Key="ViewModelCombine

Windows phone 7之页面导航

混江龙づ霸主 提交于 2020-02-13 20:54:07
首先说一下WP7程序的呈现主体与关系,直接呈现给用户的界面是页面Page,每个Page是继承自PhoneApplicationPage的类,一个程序可以包含任意多个的Page页面,这些Page页面被放在一个共同的Frame下,Frame继承自PhoneApplicationFrame 。一个应用程序只能有一个Frame,创建程序时自动生成的App.xaml.cs文件中,有关于程序Frame初始化的代码,在InitializePhoneApplication()方法中,如下 // Do not add any additional code to this method private void InitializePhoneApplication() { if (phoneApplicationInitialized) return; // Create the frame but don't set it as RootVisual yet; this allows the splash // screen to remain active until the application is ready to render. RootFrame = new PhoneApplicationFrame(); RootFrame.Navigated +=