silverlight-3.0

How to make ChildWindow blocking

主宰稳场 提交于 2020-01-01 08:01:06
问题 The ChildWindow is a modal window, but it does not block. Is there any way to make it blocking? I basically want a ShowDialog() method that will call ChildWindow.Show() but then not return until the user has closed the ChildWindow. I tried using Monitor.Enter() to block after ChildWindow.Show(), but the ChildWindow never rendered and the browser just hung. Anyone have any ideas? 回答1: I don't believe it supports that behavior. You can vote for it on CodePlex. Depending on what you want, you

Attaching an Event Handler to a Code Generated DataTemplate

谁都会走 提交于 2020-01-01 06:06:34
问题 I have a question related to this one: I'm trying to attach an event to my StackPanel but it doesn't appear to connect when using the XamlReader. I can't get the ChildItem_Load method to get called. Does anyone know of a way to do this? Other than this event the code works fine. this._listBox.ItemTemplate = (DataTemplate) XamlReader.Load( @"<DataTemplate xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""> <Border> <StackPanel Loaded=""ChildItem_Loaded""> <TextBlock Text=""

Silverlight Bind to inverse of boolean property value

半世苍凉 提交于 2020-01-01 02:28:34
问题 I want to bind a controls visibility to inverse of boolean property value. I have a property CanDownload, if it is true then I want to hide textbox and vice versa. How can I achieve this? Thanks 回答1: This sort of question is asked so often and the answers so similar I thought its time to have a single answer to all (ok may "most") of the bool to value conversion questions. I've blogged it here. The code is quite simple so I'll paste it here too:- public class BoolToValueConverter<T> :

List of WPF functionalities that aren't in Silverlight 3

时光毁灭记忆、已成空白 提交于 2020-01-01 00:40:33
问题 A common technical decision nowadays is whether to build a ClickOnce rich client application or a web application. Here I'm focussing primarily on choosing between a WPF application or a Silverlight application. The chief benefit of Silverlight is obvious - it can be hosted in a browser. But, if a programmer used to WPF was to start programing in Silverlight, what would he/she suddenly find is not possible or much harder? Items can be of the following: You just cannot do it, period You can do

Combining .NET RIA Services and MVVM in Silverlight 3.0

十年热恋 提交于 2019-12-31 23:42:23
问题 When using .NET RIA Services and MVVM in Silverlight 3.0 is there a difference between the Metadata type from RIA Services and the ViewModel from the MVVM pattern? Are these the same thing or should they be keep separate? The metadata type is a sealed internal class to the partial Entity class. There doesn't seem to be a proper separation there but the metadata type can also be decorated with attributes for Validation which makes it look like a ViewModel. I've searched around but I didn't see

silverlight - communicate between 2 view models in MVVM using commands

不打扰是莪最后的温柔 提交于 2019-12-31 22:36:08
问题 i am working on MVVM and using commanding in silverlight(DelegateEvent and ICommand) I want something like this ,(say) i have 2 usercontrols , parent and child . Parent is hosting the child , both have thier own viewmodels . On parent i have a button and it executes a simple command , on execute of that command i want to update text in the child control's textbox . also we should be able to change something in child which can propagate to the parent . Is events the best answer for this or i

Is there no Label control in Silverlight?

眉间皱痕 提交于 2019-12-30 18:45:22
问题 I can't seem to find a Label control in Silverlight. I get compile errors if I put anywhere in my XAML. 回答1: TextBlock is roughly the same as a Label from WinForms. As per MSDN: The TextBlock control is the primary element for displaying text in Silverlight based applications. Provides a lightweight control for displaying small amounts of text... EDIT : I just noticed your tag for Silverlight 3. Label should be built into Silverlight 3 so are you sure your not using 2? You might want to

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

Slow Operations In A RIA Services Domain Service Class

空扰寡人 提交于 2019-12-25 02:02:08
问题 sHi All, I am using silverlight 3 with RIA services. I was wondering how I should deal with slow operations in a domain services class? I have an operation that will take a couple of minutes. I get a WCF timeout after a minute while the client is waiting for a response from the server. Another approach perhaps? Is is possible to tell the domain services class to start an operation, and then poll the server every 5 seconds to see if it is finished. I tried implementing this and the problem I

What's this folder structure for? (Local user GAC?)

偶尔善良 提交于 2019-12-24 17:42:54
问题 I've just stumbled across this folder structure on my machine which contains lots of .NET assemblies similar to what you might find in the system GAC. This puzzled my as I've never seen this folder structure before and it makes me wonder, is there such a thing as a local user assembly cache? The folder structure is: C:\Documents and Settings\ [username] \Local Settings\Application Data\assembly\ and contains folders and files that look like: \dl3\8M830QM6.ON7\NJ9Q0EA9.TZO\623c8efc\00461250