silverlight-4.0

How to put behavior in style for TextBox in Silverlight?

人盡茶涼 提交于 2020-01-02 05:34:06
问题 In Xaml, I can put customized behavior for a textbox like: <TextBox> <i:Interaction.Behaviors> <My:TextBoxNewBehavior/> </i:Interaction.Behaviors> </TextBox> I want to all TextBox has this behavior, so how to put this behavior in implicit style like? <Style TargetType="TextBox"> <Setter Property="BorderThickness" Value="1"/> .... </Style> Update: Thanks for info. Try the way as suggested below and the app is crashed: <Setter Property="i:Interaction.Behaviors"> <Setter.Value> <My

DataGridTextColumn - How to bind IsReadonly?

笑着哭i 提交于 2020-01-02 05:04:48
问题 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

Evenly Spaced Dashes with StrokeDashArray

烂漫一生 提交于 2020-01-01 10:54:48
问题 I'm trying to create a poker chip like the one here: http://www.casinowholesalers.com/shop/product_info.php?cPath=57&products_id=379 using Expression Blend 4 for a WP7.1 Silverlight 4 app. I'm trying to create the six white "boxes" on the edge of the chip (ignoring for now the dice images and inner dashed line). The way I did it was two create two ellipses, one with no stroke, the other is the exact same size but with a stroke of 24, a color of White, and the StrokeDashArray to 1.8 (that's

Silverlight 5 Backward Compatibility

对着背影说爱祢 提交于 2020-01-01 09:18:18
问题 I have a Silverlight application developed with version 4.0. I tried running it with Silverlight 5 client and everything seems to be fine up to now. But I am wondering; if my users installs Silverlight 5 for client, is it sure my application will still work well? Do I have to run all my Test Cases again? If anyone notices something that has been broke between versions, please list it here! :) Thanks 回答1: There's little evidence around the internet at the moment, other than that published by

How to wait for state changing transition to finish in Silverlight 4?

痞子三分冷 提交于 2020-01-01 08:39:14
问题 I need to change state of a control and then do some action. To be specific, I want to run an animation before a control is hidden. I would like to do something like that: VisualStateManager.GoToState(control, "Hidden", true); // wait until the transition animation is finished ParentControl.Children.Remove(control); The problem is that the transition animation is run asynchronously and thus the control is removed from the visual tree right after the animation is started. So how do I wait for

Prism 4 - locally scoped RegionManager

萝らか妹 提交于 2020-01-01 03:22:26
问题 I have silverlight 4 application with PRISM 4, I'm using MEF. My Shell defines one main region in which modules are loaded, I want modules to have their own RegionManager, so regions that they define are places in local RegionManager instead of global. And I want this local RegionManager to be resolved by container (for type IRegionManager) when inside the module. However the method from documentation: IRegion detailsRegion = this.regionManager.Regions["DetailsRegion"]; View view = new View()

Set default value of RadDatePicker to NULL when date is not set

你。 提交于 2019-12-31 07:32:02
问题 I'm binding the RadDatePicker to a viewModel dateTime property. when the property is null in database i get 01/01/0001. How to i change this behavior to just leave the date field blank.. example: In database ===> experiation_date : NULL In View(GUI) ===> experation_date : 01/01/0001 Expected Result ===> experation_date : {Blank} 回答1: Set the SelectedDate to null (and not DBNull): RadDatePicker1.SelectedDate = null; and in xaml set DateTimeWatermarkContent to the empty string: <telerik

Set default value of RadDatePicker to NULL when date is not set

安稳与你 提交于 2019-12-31 07:31:32
问题 I'm binding the RadDatePicker to a viewModel dateTime property. when the property is null in database i get 01/01/0001. How to i change this behavior to just leave the date field blank.. example: In database ===> experiation_date : NULL In View(GUI) ===> experation_date : 01/01/0001 Expected Result ===> experation_date : {Blank} 回答1: Set the SelectedDate to null (and not DBNull): RadDatePicker1.SelectedDate = null; and in xaml set DateTimeWatermarkContent to the empty string: <telerik

how to customize the listbox selected item style in silverlight 4

。_饼干妹妹 提交于 2019-12-31 05:36:50
问题 I am having a silverlight listbox in which a list item contains an image, its name and its price. the layout of the list item will be as follows: Under the image the image name will be shown, under the image name the price will be shown. Now the problem is when i select an list item all the three items(image, image name and its price ) are selected. this is the default behavior. Now the requirement is when i select a list item only the image should be selected. please let me know if there is

How do you change the Silverlight loading screen's background?

穿精又带淫゛_ 提交于 2019-12-31 03:40:07
问题 I'm trying to avoid the default Silverlight loading screen displaying before my applet and was trying to show a blank coloured background, the same colour as my applet's. The aim is to avoid the jarring white and make it look like it's all part of one app drawing. I've discovered SplashScreenSource but I'm not sure how to hook that up to just show a single colour background instead of the loading screen. Any suggestions? 回答1: Add new XAML file to ASP.NET website, in which Silverlight will be