silverlight-4.0

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

Silverlight 4 BitmapImage - bmp file support

旧城冷巷雨未停 提交于 2019-12-20 07:22:41
问题 MSDN mentions support for PNG and JPG, but many people are trying setSource(file.bmp) and complaining about "Catastrophic failures". Can someone clarify this, is bmp supported or not ? And if not, what is the best way for displaying a bmp in silverlight ? 回答1: BMP is not supported in Silverlight. BMP is a very old and not a very efficient format (compared with PNG & JPG) so they have not bothered to support it. Silverlight only supports JPG & PNG format images. The best way to display them is

Binding a grid with two datasources in silverlight

不想你离开。 提交于 2019-12-20 05:48:11
问题 I'm having a problem with how I should bind my datagrid in the best way. The problem is that i would like to use two itemSources. I have a list with alot of incidents, each incident holds a list of buggs. What I would like to do is bind half a gridview row with some of the fields from the incident, and half of the grid with the corresponding bugs that the incident holds. How would I be able to do this in the best way? I have access to the componentOne datagrid, but if the normal grid works it

WP7 dragging a pushpin on a map

大城市里の小女人 提交于 2019-12-20 05:48:06
问题 Does anyone have any insight into how to implement a draggable pushpin on a map on a WP7 client running Mango? I have a pushpin bound to a geo-location on a map and I want the user to be able to drag it on a map and record its new location. I've seen some resources, but they're for non-WP7 Bing Maps control. Any help would be appreciated. Thanks! 回答1: e.GetPosition(element) gives the position relative to the element passed on the parameter. Also, the point to convert using

Best practice for panning/zooming a user control?

主宰稳场 提交于 2019-12-20 05:41:42
问题 We currently have a user control which displays a dynamic matrix of other user controls. Since it's dynamic, the view can become large, requiring the user to scroll up/down & left/right in the browser to view everything. I would like to give the users one view of the user control with the ability to pan & zoom on it, much like the feel of this Telerik control. We own the Telerik controls and I've tried to use the Map control for our purpose, but it doesn't seem like that is going to be a good

How to use gif animated image in WP 7

若如初见. 提交于 2019-12-20 05:30:53
问题 I have seen this post: Display GIF in a WP7 application with Silverlight But in my case? for animating I am using a popup. So when application starts it shows a popup for 5 seconds. In this popup I want to show some .gif image, but it doesn't work. Here is the code which I implement: public partial class AnimatedSplashScreen : UserControl { protected Uri ImageSource { get; set; } public AnimatedSplashScreen() { InitializeComponent(); ImageSource = new Uri( "http://upload.wikimedia.org

Listbox First Item Selected in mvvm

心不动则不痛 提交于 2019-12-20 03:52:38
问题 I am new to mvvm. I have a listbox in my silverlight application which is binded to a observable collection in view model i want to make the listbox with first item selected. I tired this but it doesnt work. <ListBox Height="431" Canvas.Left="17" Canvas.Top="77" Width="215" FontSize="13" ItemsSource="{Binding Path=Categorys, Mode=TwoWay}" DataContext="{Binding}" SelectedItem="{Binding CurrentCategory, Mode=TwoWay}" ItemTemplate="{StaticResource CategoryDataTemplate}" ScrollViewer

Silverlight: HTTP DELETE and PUT methods with RestSharp

跟風遠走 提交于 2019-12-20 03:17:54
问题 I wanted to access an internal REST API from Silverlight, but it turns out that I am not allowed to use POST or DELETE as the HTTP method for my request. Doing so always resulted in a SecurityException . What is the recommended way to use REST apis with Silverlight? 回答1: SecurityException probably means the API doesn't have the proper clientaccesspolicy.xml file in place. Here's an example of a very lenient one that allows all HTTP methods and headers. We have used this successfully for our

how to give scrolling in textbox?

為{幸葍}努か 提交于 2019-12-19 07:18:11
问题 i have taken a textbox <TextBox Height="218" HorizontalAlignment="Stretch" Margin="0,56,0,0" Name="txtBox" VerticalAlignment="Top" TextWrapping="Wrap" Text="" GotFocus="txtBox_GotFocus" TextChanged="txtBox_TextChanged" IsTabStop="True" IsEnabled="True" IsHitTestVisible="True" VerticalScrollBarVisibility="Auto" Background="White" FontFamily="Tahoma" /> Now when i enter lot of text in textbox then text scrolled up automatically. I want to show a scrollbar with which user can surf to the whole

How to replace link to hyperlink in RichTextBox (Windows phone)

时光怂恿深爱的人放手 提交于 2019-12-19 04:23:29
问题 I have a text: Download it directly to the <a href="http://itunes.apple.com/fi/app/goalapp/id502461189?ls=1&mt=8">iTunes Store</a> or <a href="https://market.android.com/details?id=com.strikersoft.meramal.se">Android Market</a>. The application is launched for Swedish app store. I know how to show a hyperlink in RichTextBox: http://msdn.microsoft.com/en-us/library/ee681613%28v=vs.95%29.aspx But how can I make this for everyone link in this code? 回答1: You should parse the string maybe with