silverlight-4.0

Getting the values of TextBox from a data bound ListBox

徘徊边缘 提交于 2019-12-13 12:24:06
问题 I need to get the values from Listbox selected items. Note that, the data templates are in data bound. here is the xaml: <ListBox Name="AppointmentResultsData" ItemsSource="{Binding}" Height="650" Width="480" Margin="24,0,0,0" Foreground="#CBF7FA" SelectionChanged="AppointmentResultsData_SelectionChanged"> <ListBox.ItemTemplate> <DataTemplate> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition/> <RowDefinition/> <RowDefinition/>

how to get to Grid x:Name=“ControlPanelGrid”

六眼飞鱼酱① 提交于 2019-12-13 08:11:22
问题 I have the following xaml and I am trying to get to the Grid to make it invisible at some point in my code if the code reaches there. Being new to .net and silverlight and xaml I am not sure why my code behind doesn't find Grid Controlpanel please see my xaml code here <UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas

Which namespace/DLL to use for ValueConversion in SL4

我是研究僧i 提交于 2019-12-13 07:15:06
问题 I am converting a SL3 application to SL4 and facing some issues. Can anyone provide me the namespace or DLL name for ValueConversion. I am getting error on the following statement. [ValueConversion(typeof(ToolType), typeof(bool))] Thanks for sharing your time. 回答1: This class is not part of Silverlight Runtime Classes now. it was there in System.Windows.Data namespace before. Ref: http://msdn.microsoft.com/en-us/library/system.windows.data.valueconversionattribute.aspx you can use

Odd behaviour when replacing DataGridCheckBoxColumn with a DataGridTemplateColumn

百般思念 提交于 2019-12-13 06:58:54
问题 I have discovered an odd behaviour when replacing a DataGridCheckBoxColumn against a DataGridTemplateColumn that contains a Checkbox. <sdk:DataGrid Grid.Column="0" IsReadOnly="{Binding IsInReadOnlyMode}"> <sdk:DataGrid.Columns> <sdk:DataGridCheckBoxColumn Header="Sales" Binding="{Binding Path=Sales}" /> </sdk:DataGrid.Columns> </sdk:DataGrid> When the DataGrid is readonly then the checkbox is also disabled. The code above works correct. Now if I want to achieve the same thing by using

Silverlight 4 LoadOperation returns null

蓝咒 提交于 2019-12-13 05:41:33
问题 LoadOperation on the client side returns null? How can I fix it? Is my code correct? Is it a best practice? Serverside (Domain service: public IQueryable<State> GetStates() { return this.ObjectContext.States.Include("Country") ; } //----------------------------------------------------------------------- Clientside LoadOperation<State> loadOp; public IEnumerable<State> Entities() { DSCommon _context = new DSCommon(); loadOp = _context.Load(_context.GetStatesQuery()); loadOp.Completed +=

Silverlight.js file broken in IE9?

流过昼夜 提交于 2019-12-13 05:41:02
问题 After downloading IE9, I found that running any Silverlight page breaks (only in IE9). After clicking "yes" to debug, I was amused to see that the Silverlight.js file is choking on some JavaScript that was put in as a hack to work with previous versions of IE. What would the fastest way to fix this be? Is there an updated Silverlight.js file I can download from somewhere? Should I use a meta tag to tell IE to render as though it were version 7 or 8? Thanks! 回答1: Silverlight.js is for helping

Silverlight DescriptionViewer prevent Tooltip to disappear on click

陌路散爱 提交于 2019-12-13 05:34:35
问题 The Silverlight 4 DescriptionViewer Control displays a Description in a Tooltip: The syntax is pretty easy: Add Namespace xmlns:dataInput="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input" and the following XAML to your UserControl: <dataInput:DescriptionViewer Description="Some hints on user input etc." /> Unfortunately, some users click on the displayed Icon (since it even hovers by default) which instantly closes the Tooltip (the actual and only information

Silverlight 4 and WPF Compatibility

不打扰是莪最后的温柔 提交于 2019-12-13 05:16:38
问题 So if I created a Silverlight app, can I take the markup + code and put it in a WPF app? I was just curious if we decide to use Silverlight, whether I could also take advantage of WPF Windows clients too. 回答1: This MSDN article may be a good reference as to where SL4 and WPF4 diverge: WPF Compatibility 回答2: You could always make your Silverlight application run Out-Of-Browser, just keep in mind you have a security sandbox which you dont have with WPF. Also Silverlight would be able to run on

Allowing item selection indicator in ListBox to overlay all items in Silverlight

一个人想着一个人 提交于 2019-12-13 04:39:54
问题 I have a ListBox that uses a WrapPanel for its ItemsPanel , a custom ItemTemplate , and a custom ItemContainerStyle . The ItemContainerStyle's template contains a selection box that shows up when an item is selected. The graphics designer would like this selection box to overlap sibling items in the ListBox like it's an overlay. The first thing I tried was setting the Canvas.ZIndex property of the ItemContainer in the Selected state. That did not seem to have an effect. Then I read that list

Invalid cross-thread access. error

假如想象 提交于 2019-12-13 04:24:26
问题 I have a web form in silverlight. On action of some button click i want to update a another control like chart, Textbox etc In the mean time when it fills the chart or textbox, i need to show a busy indicator Busy indicator should show first in screen behind the chart value should get update Chart value will reflect in screen Busy indicator should hide But the problem is when i try using Thread I am getting an error "Invalid cross-thread access.". As the thread is accessing the UI control.