silverlight

Silverlight 3.0 - How to access a MainPage control value from an UserControl

别说谁变了你拦得住时间么 提交于 2020-02-03 07:16:05
问题 I need to retrieve some control values from the MainPage to an UserControl. In this UserControl I need to be able to get the Frame.ActualWidth & Frame.ActualHeight values (in this case, the Frame element is in the MainPage and the UserControl is loaded inside a MainPage's Grid via xaml). Does someone have a sample? Thank you Josimari Martarelli ESL Sistemas Logísticos Silverlight UI Design jmartarelli@logfacil.com.br 回答1: MainPage m = (MainPage)Application.Current.RootVisual; 回答2: In

InkCanvas Eraser

回眸只為那壹抹淺笑 提交于 2020-02-03 02:24:26
问题 I have sketchpad as InkCanvas ; I want to change size of eraser so I've written: Private Sub Sketchpad_KeyDown(sender As System.Object, e As System.Windows.Input.KeyEventArgs) Handles Sketchpad.KeyDown If e.Key = Key.OemMinus Then ' Decrease size of Eraser to 5*5 Sketchpad.EraserShape = New RectangleStylusShape(5, 5) End If If e.Key = Key.OemPlus Then ' Increase size of Eraser to 50*50 Sketchpad.EraserShape = New RectangleStylusShape(50, 50) End If If e.Key = Key.I Then ' Change editing mode

Silverlight跨域访问Https下的Self-hosted WCF服务

非 Y 不嫁゛ 提交于 2020-02-02 23:14:01
跨域访问 (Cross Domain) 在 Silverlight 中是个非常讨厌的话题,常常在不经意间就会发现出现跨域访问的问题。在某些特殊的情况下,你的网站以及服务可能部署在 HTTPS 的安全环境下,例如服务器使用了 VMWare 或者 F5 等软件来让所有对于服务的请求都自动变成 HTTPS 请求,这个时候对于跨域访问的设置以及服务端和客户端的配置都有所不同。本文就着重讲述了这样情况下如何配置跨域访问并如何解决常见的请求异常。 环境 : Windows Server 2008 R2 + VMWare Tools(Https) + .NET Framework 3.5 + Silverlight 4. 因为使用了 VMWare 的软件使得所有外部对本服务器的 Web 请求均自动变为 Https 请求。在但 IIS 仍然可以区分在外部请求时是使用 Https 还是 Http 。 问题: An error occurred while trying to make a request to URI ' http://cn.mydomain.com/Allan/Services/ModelService.svc/main '. This could be due to attempting to access a service in a cross-domain way

Silverlight + WCF 的IIS 发布部署

本秂侑毒 提交于 2020-02-02 23:08:23
SL + WCF 在iis(7.0以下)上部署真是有点麻烦…记录一下: 1. 在服务器上安装 Framework 3.0 , Framework 3.5 ,和 Framework 3.5 SP1 (我就是因为没装SP1,wcf一直报错。。。。。) 2. cmd下输入: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -i -enable, 刚装新版本要确保.aspx可以正常显示, 我没注册之前都是“服务器没有响应” 3. cmd下输入: C:\WINDOWS\Microsoft.Net\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe /i /x 在iis中注册WCF组件。 4. iis7以下的版本要注册一下silverlight文件类型: iis---右键网站属性----HTTP Headers---File Types--添加下面两个类型 .xaml --- application/xaml+xml .xap ----application/x-silverlight-app 经过这番折腾终于可以正常显示silverlight + wcf 了,呵呵 !!! 来源: https://www.cnblogs.com

How to ensure all properties have loaded in Silverlight ViewModel pattern (Concurrency Control?)

早过忘川 提交于 2020-02-02 15:59:47
问题 I am struggling with a seemingly small but quite a painful predicament. I have a an object which acts as a view model to a control. The underlying View Model is designed to help display a list of Group objects and their related Event (s) OUT OF ALL AVAILABLE EVENTS . In the underlying data model I have the following entities (EF) and their corresponding relationships: Group -> GroupEvent <- Event The view model has two observable collections - one for events and one for groups. The events

Silverlight - binding a listbox within a listbox template

痴心易碎 提交于 2020-02-02 10:32:53
问题 In silverlight, I'm trying to build a listbox of reports and I'm trying to show the parameters of the report in a listbox within the datatemplate of the outer reports listbox. Here are the data classes: public class Report { public string Title { get; set; } public string Description { get; set; } public List<ReportParameter> Parameters = new List<ReportParameter>(); } public class ReportParameter { public string Name { get; set; } public string ParameterType { get; set; } public bool

Silverlight 4 and out of browser

十年热恋 提交于 2020-02-02 04:07:57
问题 Does any one know if its possible to animate app.current.mainwindow.width so that you get a nice animation with easing if you programatically resize the oob apps window. Thanks. 回答1: The simplest way is to add a slider control to your page. The slider can be collapsed and is only used to have an easy propery to animate. Animate the Value property of the slider. In the ValueChanged event of the slider update the window width. You need elevated thrust to do this. It looks something like this:

Silverlight 4 and out of browser

怎甘沉沦 提交于 2020-02-02 04:07:15
问题 Does any one know if its possible to animate app.current.mainwindow.width so that you get a nice animation with easing if you programatically resize the oob apps window. Thanks. 回答1: The simplest way is to add a slider control to your page. The slider can be collapsed and is only used to have an easy propery to animate. Animate the Value property of the slider. In the ValueChanged event of the slider update the window width. You need elevated thrust to do this. It looks something like this:

Silverlight主题应用小结

♀尐吖头ヾ 提交于 2020-02-01 07:18:55
摘要: 本文总结了通过Silverlight ToolKit和ResourceDictionary使用Silverlight主题的方式。 注: 本文使用的IDE是vs.net 2010 Ultimate SP1;Silverlight版本为4;Silverlight Toolkit使用的是Silverlight_4_Toolkit_April_2010.msi安装包。从 http://silverlight.codeplex.com/ 可以获得Silverlight Toolkit的安装文件。通过下面的链接能够访问Toolkit的演示页面: http://silverlight.net/content/samples/sl4/toolkitcontrolsamples/run/default.html Silverlight在当初发布时就已酷炫的用户界面吸引了很多人的关注,很多人也因此开始加入了Silverlight开发的团队中。但是对于大部分开发人员来说想要做出一些比较好看的界面是比较困难的。不过幸好有一些现成的主题供我们使用,美化我们的界面。 一、使用Silverlight ToolKit应用主题 我们可以访问Silverlight Toolkit的演示页面选择Theme Browser查看我们想要的主题样式。例如我们想使用TwilightBlue主题。

How do I move GPS watcher to App.xaml superclass and Dispatch events to other pages/classes?

 ̄綄美尐妖づ 提交于 2020-02-01 06:35:38
问题 I am new to developing for silverlight/WPF and WP7, however I am familiar with developing C# using console or windows form, so bear with me! I am trying to create a location aware app using the Silverlight SDK and the Microsoft.Maps.MapControl and the System.Device.Location classes. The problem I am having is accessing the "watcher" from other pages. What is the best way to do this. I want to put it outside of my GUI page classes so that when switching between pages, you are not checking for