silverlight-4.0

MouseLeftButtonDown is not fired on TreeViewItem

烈酒焚心 提交于 2019-12-11 02:41:59
问题 <Grid x:Name="LayoutRoot" Background="White"> <sdk:TreeView MouseLeftButtonDown="TreeView_MouseLeftButtonDown"> <sdk:TreeViewItem Header="this is first item"/> </sdk:TreeView> </Grid> call is not coming to TreeView_MouseLeftButtonDown event handler.. any ideas or work around? 回答1: Have you ever noticed that the MouseLeftButtonDown and MouseLeftButtonUp events are not fired when a Silverlight button is clicked? The reason for this is that the button handles these two events itself by

Timer not updating regularily and “skips” a second (Silverlight 4 DispatcherTimer)

本秂侑毒 提交于 2019-12-11 02:37:59
问题 I would appreciate some help with the following issue - you can see this problem on my live poker blinds timer: The main clock (Blind timer countdown) starts off on 20:00 and then jumps to 19:58. The Level timer (which counts up at top of screen) - starts off in synch and is therefore a second out. Here is my code: XAML: TextBlock Text="{Binding TimeLeftInCurrentBlindFormatted}" and my Tournament class: private DispatcherTimer timerBlind; private DateTime? blindTimeStarted = null; public

Unable to set a reference to System.Data.dll in a Silverlight client project

浪子不回头ぞ 提交于 2019-12-11 02:10:52
问题 I created my first Silverlight application. In the client project, I want to define a Dataset object. To do so, I figured I first need to reference the System.Data namespace in the dll of the same name. When I add a reference to the dll, I get a msg that "it was successfully added," I see thje dll in copied to the bin folder, and then it promptly removes the referenced dll from the bin folder. Why? 回答1: There is no Dataset class in the Silverlight SDK in fact there is no System.Data namespace

How to extract value from selected TextBlock element in a ListBox?

馋奶兔 提交于 2019-12-11 02:09:53
问题 I'm using a ListBox to display all values contained in Dictionary<> object: <ListBox Height="519" x:Name="ContactsListBox" Width="460" Margin="0,0,0,0" SelectionChanged="ContactsListBox_SelectionChanged"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel Orientation="Vertical"> <TextBlock Text="{Binding Key}" Margin="5" Foreground="{StaticResource PhoneAccentBrush}"/> <TextBlock x:Name ="LastNameData" Text="{Binding Value}" Margin="20, 0" /> </StackPanel> </DataTemplate> </ListBox

Popup Outside the Bounds of the Silverlight Control

断了今生、忘了曾经 提交于 2019-12-11 02:09:52
问题 I'm simply wondering if it is possible to open one or more non-modal popups or dialogs, which are NOT limited to be displayed and moved within the bounds of the parent Silverlight control. Doesn't seem to be possible, even for out-of-browser installs. I hope I'm wrong :) 回答1: While the previous answers are true, strictly speaking it is possible in browser mode to have a real popup. At the moment it can only be done indirectly and with a lot more work than a normal Silverlight popup Window.

Is there a way to selectively skip silverlight field validation when using wcf ria?

拟墨画扇 提交于 2019-12-11 02:06:48
问题 I have a (likely common) case where I would like to reuse the same class for both adding a new entity and editing an existing entity in my silverlight app (SL4, WCF RIA, EF4, Linq-to-Entities). When adding a new one, I would like my custom validator to check for uniqueness and fail if it's not unique. However, when editing, I don't want that same validator to prevent edits. Is there a way to temporarily turn off validation for a single field (ideally by validation type so that the other

Silverlight 4 Drag and Drop Alternatives

こ雲淡風輕ζ 提交于 2019-12-11 01:53:40
问题 I want to add the ability to drag a user control from one part of a Silverlight 4 page onto another user control on the same page (not talking about the new Silverlight 4 ability to drag a file from the OS onto the page). What approach is most straightforward? What approach offers the most flexibility? Here are some alternatives I found so far SO drag-and-drop-control-for-silverlight. Same question but answers apply to SL 2. Alex van Beek's DragManager. Written for SL3. Silverlight Drag Drop.

Does Silverlight 4 support drag and drop from app to desktop?

烂漫一生 提交于 2019-12-11 01:33:41
问题 I have seen that SL4 support drag and drop from the desktop to the application, but is it possible to drag and drop from the application to the desktop ? Thanks, 回答1: No, it does not support this scenario. 来源: https://stackoverflow.com/questions/2528904/does-silverlight-4-support-drag-and-drop-from-app-to-desktop

How to deploy the silverlight web site on localhost (IIS 7)

狂风中的少年 提交于 2019-12-11 01:33:06
问题 I am new to Silverlight, I have created an application having DLL Project, Silverlight project, and Silverlight.web project. Now I wanted to publish or deploy it in the IIS so that I can test the Silverlight web application. Can someone help me to deploy and publish silverlight web application? 回答1: Right Click the Silverlight.Web project in Visual Studio. Select the publish option. Enter your web site configuration in "Publish Web" window. If you are really new to IIS you can find a very

Installing Silverlight 4 app with sllauncher does not work

痞子三分冷 提交于 2019-12-11 01:20:44
问题 I'm trying to install a XAP file offline using sllauncher but it is not working. UPDATE I erased all the existing references and folders for my app and now it seems to be working. I will leave this up as it has some good clues on how to solve this. C:\Documents and Settings\Rod\Local Settings\Application Data\Microsoft\Silverlight\OutOfBrowser\index I made a bat file with the following: "%ProgramFiles%\Microsoft Silverlight\sllauncher.exe" /install:"c:\TourneyManager.xap" /origin:"http://www