silverlight

Targeting both .NET 3.5 and Silverlight

落花浮王杯 提交于 2019-12-20 10:37:17
问题 Let's imagine I already have a project building .NET 3.5 assembly. Now I want to build this assembly for Silverlight, and moreover, maintain its Silverlight version with minimal efforts further. What is not acceptable: Creating separate project for Silverlight build What is acceptable: Adding custom directives allowing me to target either Silverlight or .NET dependently on e.g. MSBuild properties. Adding special build configurations for Silverlight Adding #ifdef Silverlight / #endif sections

How to secure a Silverlight-Enabled WCF Web Service with SSL?

这一生的挚爱 提交于 2019-12-20 10:11:37
问题 How do you secure a Silverlight-Enabled WCF Web Service with SSL? I have tried setting it up similar to a regular WCF service secured by SSL, but it doesn't seem to work. What do you set in the Web.Config , and what do you set in the Silverlight's ServiceReferences.ClientConfig ? I noticed that in the ServiceReferences.ClientConfig file of the Silverlight client app that the "Binding" tag only allows basicHttpBinding and NOT wsHttpBinding. Does this mean that you can not secure a Silverlight

WPF Expander Button Styled so it is inside Expander Header

十年热恋 提交于 2019-12-20 10:10:15
问题 I am using the Expander control and have styled the header as shown in the picture below: http://www.hughgrice.com/Expander.jpg The problem I have is that I want the expander button to be contained within the header so that the line for the end of the header template aligns with the Expander content i.e. I ultimatly want to end up with something similar to the image below: http://www.hughgrice.com/Expander.gif Thanks in advance. 回答1: I see that you want to actually move the expander button

What is difference between “ * ” and “Auto” in Silverlight Grid Layout Definitions

我只是一个虾纸丫 提交于 2019-12-20 09:36:47
问题 trying to understand the following: <Grid Name="Root"> <Grid.RowDefinitions> <RowDefinition Height="*" /> <RowDefinition Height="*" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> </Grid> Can anyone help me in explaining the difference between * and Auto in the above snippet? thanks 回答1: Auto means give this column/row the size of the

TextBox.TextChanged event firing twice on Windows Phone 7 emulator

无人久伴 提交于 2019-12-20 08:30:29
问题 I have a very simple test app just to play around with Windows Phone 7. I've just added a TextBox and a TextBlock to the standard UI template. The only custom code is the following: public partial class MainPage : PhoneApplicationPage { public MainPage() { InitializeComponent(); } private int counter = 0; private void TextBoxChanged(object sender, TextChangedEventArgs e) { textBlock1.Text += "Text changed " + (counter++) + "\r\n"; } } The TextBox.TextChanged event is wired up to

ReactiveUI and Caliburn Micro together?

て烟熏妆下的殇ゞ 提交于 2019-12-20 08:11:21
问题 I've been doing some prototype work on a new Silverlight application using Caliburn Micro as our MVVM Framework. The team has generally been happy with it. In order to address some issues with throttling requests to services, it was suggested that I look into ReactiveUI's ReactiveCollections and their implementation of INotifyPropertyChanged. Does anyone have any experience around using the two together? Since they are both primarily MVVM Frameworks, there's a good bit of overlap, so I wonder

ReactiveUI and Caliburn Micro together?

旧巷老猫 提交于 2019-12-20 08:11:20
问题 I've been doing some prototype work on a new Silverlight application using Caliburn Micro as our MVVM Framework. The team has generally been happy with it. In order to address some issues with throttling requests to services, it was suggested that I look into ReactiveUI's ReactiveCollections and their implementation of INotifyPropertyChanged. Does anyone have any experience around using the two together? Since they are both primarily MVVM Frameworks, there's a good bit of overlap, so I wonder

XamlParseException in View

只谈情不闲聊 提交于 2019-12-20 07:29:14
问题 I've got a view that shows only a Label. The viewmodel is injected correctly in the view because the text of the label is bound to a viewmodel property. Now, if I try to define a DataGrid in the xaml, I've got a XamlParseException: {System.Windows.Markup.XamlParseException: Type 'DataGrid' not found. [Line: 16 Position: 45] su System.Windows.Application.LoadComponent(Object component, Uri resourceLocator) su Common.Views.FunctionalityView.InitializeComponent() su Common.Views

how do I access a XAML object from a class other than main?

大兔子大兔子 提交于 2019-12-20 07:13:53
问题 If I try "var mainpage new Mainpage()" I will run the mainpage constructor and then all the fields in the XAML object will return to null. How to I access XAML objects in silverlight that are from a different class but part of the same namespace? Let me explain by example. If you look at the first answer, here is what I am encountering public class MyPage { MyPage() { // the constructor makes all the variables from the xaml null } public TextBox MyTextBox { get { return SomeTextBox; } } }

Chinese characters are rendering in bold

送分小仙女□ 提交于 2019-12-20 07:13:31
问题 Silverlight renders few Chinese characters as Bold in a text box. This textbox has no font family set on it. Please refer to the following screenshot In the above screenshot, first character is bolder than the other. One of the MSDN posts says that this is because of the font family problem and setting SimSun font family should fix the problem. Here is the screenshot after the applying the font family. It looks like setting SimSun is actually fixing the issue. But I am not sure if this is the