silverlight-4.0

Launch Silverlight Out-of-Browser from browser post-installation

随声附和 提交于 2019-12-05 12:41:46
问题 I am building a prototype application in Silverlight 4 Beta and I am using the Out-of-Browser (OOB) functionality. I need the OOB functionality to be able to access the local file system, and I would like to avoid writing an ActiveX component or Java applet. I have a requirement to be able to launch the OOB experience from the browser once it has been installed on the client machine. All I seem to be able to do is detect from the browser whether the application has been installed, and then

Silverlight 4 and out of browser

家住魔仙堡 提交于 2019-12-05 12:31:35
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. 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: Xaml <UserControl.Resources> <Storyboard x:Name="Storyboard1"> <DoubleAnimation Duration="0:0:1" To="750"

How to apply a Filter to a PagedCollectionView but prevent CollectionChanged event from firing on edit?

淺唱寂寞╮ 提交于 2019-12-05 12:23:17
I have a Silverlight application where a DataForm binds on a PagedCollectionView containing objects that implement IEditableObject . Whenever the user edits an object using the DataForm, the CollectionChanged event on the collection fires twice, first with a Remove action, then with an Add action. This is not what I want. I simply want to edit the object in the collection without firing the CollectionChanged event. When I try to reproduce this issue in a simple test application, it behaves as I would like (i.e. not firing the event), and I cannot figure out what causes the difference in

Silverlight 4 - How can I change button background color when focused with an Implicit button style?

荒凉一梦 提交于 2019-12-05 11:54:36
I'm having a great deal of difficulty trying to achieve something that should be trivial. I'm using an Implicit Button Style defined in a global XAML resource file. I just want to change the background color of the focused button to red with a ColorAnimation. I've tried a number of different combinations in Storyboard.TargetProperty and Storyboard.TargetName and nothing has worked. How can I achieve this? Thanks in advance. <Style TargetType="Button" > <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="Button"> <Grid x:Name="grid" RenderTransformOrigin="0.5,0.5"> <Grid

What is the return type for a anonymous linq query select? What is the best way to send this data back?

允我心安 提交于 2019-12-05 11:17:21
This is a basic question. I have the basic SL4/RIA project set up and I want to create a new method in the domain service and return some data from it. I am unsure the proper easiest way to do this.. Should I wrap it up in a ToList()? I am unclear how to handle this anonymous type that was create.. what is the easiest way to return this data? public IQueryable<ApplicationLog> GetApplicationLogsGrouped() { var x = from c in ObjectContext.ApplicationLogs let dt = c.LogDate group c by new { y = dt.Value.Year, m = dt.Value.Month, d = dt.Value.Day } into mygroup select new { aaa = mygroup.Key,

SL4 AutoCompleteBox repeating filter results issue

懵懂的女人 提交于 2019-12-05 10:29:21
I'm having an issue with the AutoCompleteBox filtering. It seems to be rembering the previous filter. For example I type in 'A' and it returns 1 item. I delete the 'A' and type in 'Z' which should return 1 item. The problem is it returns the results from the 'A' filter plus the 'Z', I delete 'Z' and type 'S' which brings back 2 items and it now displays the results from all 3 filters. Am I doing something wrong? stockTypes.Add(new StockTypeDTO() { Description = "Steel Coil", StockCode = "SC" }); stockTypes.Add(new StockTypeDTO() { Description = "Palletised Steel Coil", StockCode = "PS" });

Pixel fonts in Silverlight 4

安稳与你 提交于 2019-12-05 10:07:17
Is there a way to render pixel fonts correctly in Silverlight 4? Without breaking text into paths or some sort of manual rendering because the text is dependent on data binding. Tweaks with UseLayoutRounding and .5px positioning shifting don't work. Just have created a custom TextBlock control which renders text with a pixel font and anti-aliasing turned off. Pixel Fonts for Silverlight MS render the font anti-aliased to make them look better... generally... but of course that does not work for pixel fonts that are already optimised for a specific display size. Manual rendering from a set of

Silverlight MVVM binding updates fire in undesired order

≡放荡痞女 提交于 2019-12-05 09:17:34
Scenario : In a Silverlight 4 MVVM project, we have a ListBox control containing items, the selected item is two-way-bound to the appropriate property in the ViewModel. Another control (for example reasons, I've stripped it down to a single TextBox ) is data bound to the selected item's content. The value should update on leave/focus lost. Problem : When the value in the TextBox is changed and we leave that TextBox by pressing the Tab key, everything works as desired - the value is updated. However, if the user clicks on a different item in the ListBox , then the SelectedItem setter is fired

DataGridTextColumn - How to bind IsReadonly?

北城以北 提交于 2019-12-05 08:26:52
In Silverlight 4, the IsReadOnly property of DataGridTextColumn seems to be no dependency property. Hence I could not bind it to a property on the viewmodel. It seems the only alternative is using a DataTemplate, but even here I am facing two major problems: <sdk:DataGrid Style="{StaticResource DataGridStyle}" x:Name="call_dataGrid" ItemsSource="{Binding Calls}"> <sdk:DataGrid.Columns> <sdk:DataGridTextColumn Header="Call Time" Binding="{Binding Path=CallTime}" /> <sdk:DataGridTemplateColumn Header="Call Date"> <sdk:DataGridTemplateColumn.CellEditingTemplate> <DataTemplate> <TextBox Text="

wshttpbinding support in silverlight 4

非 Y 不嫁゛ 提交于 2019-12-05 07:46:26
Does silverlight 4 beta supports wshttpbinding (wcf)? If not, will it be supported in stable release? No, it doesn't look like it. Check out these blog post on the topic: New Web Services features in Silverlight 4 Beta WCF net.tcp Protocol in Silverlight 4 Silverlight 4 will support the NetTcp Binding, mostly for intranet scenarios - but I haven't heard anything about support for wsHttpBinding, sorry. Marc 来源: https://stackoverflow.com/questions/1854126/wshttpbinding-support-in-silverlight-4