silverlight-4.0

Pinch To Zoom functionality in windows phone 8

徘徊边缘 提交于 2019-11-26 23:05:07
问题 From this post i came to know that there exist some platform improvements for implementing pinch and zoom functionality. By using this new method( ManipulationDeltaEventArgs.PinchManipulation ) how i can implement pinch to zoom functionality in windows phone. Apart from this i need to implement scrolling feature too to the image control. In my current implementation, i am using Toolkit(gesture listener) for pinch and zoom functionality along with scroll viewer, now it seem both scrolling and

How can I pass the event argument to a command using triggers?

馋奶兔 提交于 2019-11-26 22:40:26
问题 So I have a simple setup, an autocompletebox with its Populating event that I want to bind to a command. I use clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity (is there a better namespace for doing this?) It's not a big deal to bind it, the big deal is to pass that PopulatingEventArgs argument to the bound command. So how do I do it according to the best practices of PRISM in particular and MVVM in general? 回答1: There is no built-in way, so here is how I do it

Windows phone 7 config / appSettings?

試著忘記壹切 提交于 2019-11-26 21:32:12
问题 Is there a way to add a config file for WP7 apps like there is for Windows apps and web apps? I just need an easy way to save a few settings I'd rather not create my own object and have to serialize/deserialize an xml file. There doesn't seem to by any kind of item template that I can add to my project so just wondering if anyone has done this or an idea on the best way? 回答1: I wrote a simple wrapper around the IsolatedStorageSettings class that helps store and retrieve settings. Maybe you

Adding stored procedures complex types in Entity Framework

半城伤御伤魂 提交于 2019-11-26 18:36:29
I am trying to use a stored procedure in Entity Framework that returns nothing. I did the following: Added a function (right click on stored procedure -> add -> function import-> Complex Type -> Get column information -> create New Complex-Type) My function name: summarySP_Result . After building the project the entity class is not generated in Generated_code ( BusinessAccount.web.g.cs ) But entity classes for tables and views are all created but nor for stored procedure. Can anybody give the idea why it is not generated entity class in BusinessAccount.web.g.cs ? Update : Let me confirm

What is the replacement for DataTrigger in Silverlight

做~自己de王妃 提交于 2019-11-26 18:18:29
问题 This is my scenario. I have 2 Properties. Type and State. Type is an Enum with 3 values eg, ball, car, arrow. State is an int which would accept 3 state values eg., -1, 0, 1. Also, I have 9 images for each state values. Like, if I select type as ball and value as -1, I want to display a Red color ball. If I select type as arrow and value as 1, I want to display a up arrow. etc., I'm able to do this in WPF. I created 3 DataTemplates with an empty Image. Then, I use DataTrigger to check and

Silverlight 4 Data Binding with anonymous types

随声附和 提交于 2019-11-26 18:14:28
问题 Does anyone know if you can use data binding with anonymous types in Silverlight 4? I know you can't in previous versions of silverlight, you can only databind to public class properties and anonymous type properties are internal. Just wondering if anyone has tried it in silverlight 4? 回答1: You can... If you expose your internals. Place this in your AssemblyInfo.cs: [assembly: System.Runtime.CompilerServices.InternalsVisibleTo("System.Windows")] 来源: https://stackoverflow.com/questions/2684954

How to access a specific item in a Listbox with DataTemplate?

元气小坏坏 提交于 2019-11-26 17:43:50
I have a ListBox including an ItemTemplate with 2 StackPanels. There is a TextBox in the second StackPanel i want to access. (Change it's visibility to true and accept user input) The trigger should be the SelectionChangedEvent. So, if a user clicks on an ListBoxItem, the TextBlock gets invisible and the TextBox gets visible. XAML CODE: <ListBox Grid.Row="1" Name="ContactListBox" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" ItemsSource="{Binding Contacts}" Margin="0,36,0,0" SelectionChanged="ContactListBox_SelectionChanged"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel

Silverlight 4: Chart Toolkit Color Set

守給你的承諾、 提交于 2019-11-26 17:21:13
问题 Im migrating my Chart code from visifire to Toolkit. I would like to know the counter part of ColorSet property[sample value Caravan,Picasso..] of Visifire to Toolkit. Is there any? TIA 回答1: At first you need to copy color codes from a Visifire color set. They are defined in the file (Visifire source code)\Common\SLVisifireCharts\ColorSets.xaml or here. The counterpart of the ColorSet property is the Palette property, which takes complex dictionary of resources. Here is the example for the

How to zoom in and zoom out Images in WP7?

我们两清 提交于 2019-11-26 15:55:13
问题 I have made an application which displays Images .Now I want to implement zoom in and zoom out feature(by using two fingertip's) as in native windows phone photo viewer application.Any idea on how to proceed . Thanks in Advance. 回答1: Perhaps the most expedient approach would be to include the Silverlight for Windows Phone Toolkit. This contains a GestureService that will help with pinch and rotate touch gestures. You could apply it to an image like this:- <Image Source="someSourceUrl"

Adding stored procedures complex types in Entity Framework

房东的猫 提交于 2019-11-26 06:29:09
问题 I am trying to use a stored procedure in Entity Framework that returns nothing. I did the following: Added a function (right click on stored procedure -> add -> function import-> Complex Type -> Get column information -> create New Complex-Type) My function name: summarySP_Result . After building the project the entity class is not generated in Generated_code ( BusinessAccount.web.g.cs ) But entity classes for tables and views are all created but nor for stored procedure. Can anybody give the