silverlight

Binding KeyDown Event Silverlight

喜欢而已 提交于 2019-12-25 03:30:34
问题 I am attempting to have a key binding cause an event within the view model. I have been search for a while and have not come across any solutions that have worked thus far, unfortunately. This is what I am basically attempting to implement: <i:Interaction.Triggers> <i:EventTrigger EventName="createNew"> <cal:ActionMessage MethodName="newCustomer" /> </i:EventTrigger> </i:Interaction.Triggers> I am wanting a way to provide a "hotkey" to allow the user to implement a newCustomer event within

Do Silverlight and AJAX play complementary roles or will one replace the other?

穿精又带淫゛_ 提交于 2019-12-25 03:29:08
问题 AJAX is the big thing...but it seems (to me) that with Silverlight 4 Microsoft has offered a really robust method for creating UI interfaces for the web. I'm wondering - what is the future of AJAX? Do AJAX and Silverlight complement each other or will Silverlight replace AJAX, etc.? 回答1: Silverlight and AJAX are different tools for different jobs. Before I go any further, let me just clarify what I mean by AJAX in this context. AJAX is a way to build rich browser based application by using

Pendulum-like animation in silverlight

Deadly 提交于 2019-12-25 03:19:21
问题 Hi I would like to make animation start from the center and then swing like see-saw. Basiclly, it is what I posted in XAML but I cannot get it working. <Storyboard x:Name="wiggleAnimation" > <DoubleAnimation Storyboard.TargetName="rotateSlider" Duration="0:0:1" To="20" Storyboard.TargetProperty="Angle"> </DoubleAnimation> <DoubleAnimation Storyboard.TargetName="rotateSlider" Duration="0:0:1" To="-20" RepeatBehavior="Forever" AutoReverse="True" Storyboard.TargetProperty="Angle"> <

Overriding method of an element within a XAML UserControl?

隐身守侯 提交于 2019-12-25 03:18:22
问题 I have a Silverlight user control that has no template and does not need one as it is simply a path with a RectangleGeometry that is resized by code. Now our designed has added a template to the tooltip of the path and I want to be able to provide a method for users of the control to change the layout of a portion of this template. If the template was part of an overall one for the control I could simply override the control's OnApplyTemplate method and grab a reference to the section I want

WP7 Silverlight grid not showing content

老子叫甜甜 提交于 2019-12-25 03:11:57
问题 It's been 2 hours of struggle against SL grid on WP7. I build my grid using the following code: public void initUIBoard() { int x, y; Button b; for (x = 0; x < mine.cRows; x++) { RowDefinition rd = new RowDefinition(); rd.Height = new GridLength(20); uiBoard.RowDefinitions.Add(rd); } for (y = 0; y < mine.cColumns; y++) { ColumnDefinition cd = new ColumnDefinition(); cd.Width = new GridLength(20); uiBoard.ColumnDefinitions.Add(cd); } for (x = 0; x < mine.cRows; x++) for (y = 0; y < mine

Silverlight best practice for validation?

走远了吗. 提交于 2019-12-25 03:08:30
问题 Is there some best practice or some recommended way how to validate forms in Silverlight? Right now I have to doall validation in endless nested if else structures and it just doesn't seem like a very reusable and maintainable way of doing this. If I want to show error messages next to each form element I also have to create an empty text block next to each element which will hold the error in case the field is invalid. 回答1: I would recommand you the Silverlight toolkit, which provides easy

Silverlight AutoCompleteBox takes a long time to respond on first “search”

别来无恙 提交于 2019-12-25 03:02:00
问题 I have a Silverlight application which loads about 2000 objects of half a dozen fields into an AutoCompleteBox. The filter is then set to search on any of four of the fields. I've set it to begin searching after two characters. However, when I type the second character (when the box is supposed to start populating) for the very first time after populating the List of objects, the AutoCompleteBox takes about 6-7 seconds to respond. Any ideas on how I can optimize this? Is there a way to create

Disabling Button with custom Content in Silverlight?

爱⌒轻易说出口 提交于 2019-12-25 02:57:15
问题 What is the easiest way to create a Silverlight Button with custom Content which knows how to ' look ' disabled? I.e. if you set IsEnabled="False" it will look greyed out. The custom Content will be dead simple, text and an image. I have done this before in a WPF application quite easily by setting the Content to a StackPanel containing a TextBlock and an Image. I then implemented a Style Trigger on the Image to change it to a greyed out version when it wasn't enabled. The text changed colour

Windows authentication with Silverlight custom binding

半城伤御伤魂 提交于 2019-12-25 02:55:34
问题 I am trying to set up security within a web.config file for a WCF service hosted in IIS but keep getting the error message: Security settings for this service require 'Anonymous' Authentication but it is not enabled for the IIS application that hosts this service. I have read Nicholas Allen’s blog (link text) and it appears that this is the route that I need to take. However, I am using “binaryMessageEncoding” in a customBinding for my Silverlight service, and as such, I’m not sure how to

Completely embedding a Silverlight Application in an HTML Page?

隐身守侯 提交于 2019-12-25 02:52:28
问题 I am still trying to solve the issue of displaying an image on a website without having the image external. As the data: scheme does not work on older browsers or big images, I'm currently experimenting with Silverlight. I managed to solve the embedding by Base64 Encoding the Image and passing it in using the InitParams, but actually I just moved my problem away: Instead of an external Image, I now have an external XAP File... Is there a way taking the XAP File and somehow embedding it in the