silverlight

FIPS-compliant Isolated Storage in WinXP?

给你一囗甜甜゛ 提交于 2019-12-24 13:26:35
问题 I've read (but not tested) that Isolated Storage uses Sha1Managed, which is not FIPS-compliant? Is that accurate, and can anything be done to use Isolated Storage on a FIPS-compliant WinXP SP2 box? I've seen mention of "Isolated Storage" within both the ClickOnce and Silverlight spaces. I'd appreciate an informed answer regarding either (or both!). 回答1: Yes, Isolated Storage does use SHA1Managed internally, which is not FIPS compliant. You will get an exception thrown from within the

Context menu selected item wp7

被刻印的时光 ゝ 提交于 2019-12-24 12:32:45
问题 I have a Listbox. Each item has Context menu.IfI simply hold on item and do work with it, it not selected and I get error.If I for the first select item and than do work, all is ok.How I can select item on hold gesture? <DataTemplate> <Grid Margin="0,5"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <toolkit:ContextMenuService.ContextMenu> <toolkit:ContextMenu IsEnabled="{Binding uid, Converter={StaticResource CanDelete}}"

Silverlight background thread to measure height

梦想的初衷 提交于 2019-12-24 11:55:59
问题 Thread MeasureThread = new Thread(delegate() { TextBlock tb = new TextBlock(); }); MeasureThread.Start(); This throws an invalid cross thread access exception, even though this particular TextBlock would never be added to the visual tree. I realize that I could probably wrap it with Dispatcher.BeginInvoke, but that seems to defeat the point of using a background thread. I wanted to use this textbox to calculate the height of some text, for 1000+ different texts. I was hoping to be able to do

Bing map silverlight binding for moving target

你离开我真会死。 提交于 2019-12-24 11:49:22
问题 I want to animate a "car" dot on a Bing map. I can easily draw multiple dots as the item travels around, but I want to have a single dot move around per car. XAML <m:Map Name="myMap" Grid.Row="2" MouseClick="myMap_MouseClick" UseInertia="True"> <m:MapLayer x:Name="carLayer" /> </m:Map> Some code: private void AddCarDot(double latitude, double longitude) { Ellipse point = new Ellipse(); point.Width = 15; point.Height = 15; point.Fill = new SolidColorBrush(Colors.Blue); point.Opacity = 0.65;

Thread safe, Silverlight

时光总嘲笑我的痴心妄想 提交于 2019-12-24 11:44:24
问题 I use very often RIA WCF Services and I inject the same context in several ViewModel. My problem is that as you know, the context of RIA Services, is not thread safe. So I my solution "home made" for synchronization. I use backgrounds workers, and using PostSharp, I apply my attribute [UniqueThread ("Data")] on the method and voila. Do I complicate things? Are there simpler solutions? Best regards, Vincent BOUZON 回答1: In our case we added an OnUiThread method to our BaseViewModel (which also

Silveright UIElementCollection change notifications?

旧街凉风 提交于 2019-12-24 11:37:03
问题 I am deriving a class from the Silverlight Panel class so that I can perform some custom positioning of the child elements of the panel. How do you find out when the collection of child items has been changed? The Panel.Children collection does not have any events indicating change notifications. Do I have to scan the Children collection each time a measure occurs and look for the elements that have been added and disappeared? 回答1: Try this post: Silverlight: Getting notified upon changes to

How to do dynamic binding with Listbox in silverlight?

隐身守侯 提交于 2019-12-24 11:36:27
问题 I am developing silverlight 4 application. I am using the following listbox for dynamic binding <ListBox Margin="44,100,46,138" x:Name="lstbox1"> <ListBox.ItemTemplate> <DataTemplate> <StackPanel Orientation="Vertical"> <TextBlock Text="{Binding A1}" Foreground="Gray" FontSize="14" Width="100" Height="20" ></TextBlock> <TextBlock Text="{Binding A2}" Foreground="Red" Width="100" Height="20" ></TextBlock> <Line X1="-3400" Y1="32" X2="10" Y2="32" Stroke="Gray" StrokeThickness="1"/> </StackPanel>

PivotItem control windows phone 7 set color of disabled header

 ̄綄美尐妖づ 提交于 2019-12-24 11:35:08
问题 Is there a way to set the state of the header color in XAML when the PivotItem control is not the current selected one. This is the header code i am using for the pivot item control <controls:PivotItem.Header> <TextBlock Text="first" Foreground="{StaticResource PhoneAccentBrush}"/> </controls:PivotItem.Header> In the below example, I want all the header's color to be PhoneAccentBrush but when it goes in the disabled state, I want to it to be grey (but it becomes a dimmed version of

string format not working for DataGridTextColumn?

╄→гoц情女王★ 提交于 2019-12-24 11:30:26
问题 Put folloing xaml for Currency formating, but not working. Why? <sdk:DataGridTextColumn Header="Amount" Binding="{Binding Amount, StringFormat={}{0:C}}" /> 回答1: Try... <sdk:DataGridTextColumn Header="{Binding Amount, StringFormat=Amount: {0:C}}"/> 回答2: Make sure that Amount is in numeric type. Strings won't format. 来源: https://stackoverflow.com/questions/4465348/string-format-not-working-for-datagridtextcolumn

calling external websites from silverlight

蹲街弑〆低调 提交于 2019-12-24 11:22:23
问题 I am writing a small silverlight app just to try silverlight. My idea is to make a small app that checks if websites are online. It works by the user inputting a URL and my app checks it uptime every 5 minutes. But when ever I do a webrequest I get the security exception below. Reading http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest(VS.95).aspx it seems to indicate that silverlight doesn't allow crossdomain connection. So is there no way to make my idea work in silverlight?