silverlight-4.0

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

▼魔方 西西 提交于 2019-12-19 04:23:12
问题 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

Silverlight 4 memory leaks

拥有回忆 提交于 2019-12-19 04:04:29
问题 I have a Silverlight 4 application which has a leaky ViewModel class. I have confirmed this by using WinDbg and the !gcroot command on my ViewModel type. I was unable to pin point the exact cause of the memory leak but have attempted to resolve it by using the following line of code in the corresponding view when it is closed: HtmlPage.Window.Navigate(new Uri(MyTopLevelUri)); This forces the app to restart and hence the RootVisual is reinitialised. Now when I use WinDbg I can see that there

Dragging a WPF user control

懵懂的女人 提交于 2019-12-19 03:08:11
问题 I created a movable UserControl <UserControl x:Class="Restaurant.Views.Managerer.TablePanel" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:Restaurant.Helpers.Converter" mc:Ignorable="d" x:Name="root" MouseLeftButtonDown="root_MouseLeftButtonDown"

Define the path data from code behind in silverlight

你离开我真会死。 提交于 2019-12-19 02:31:17
问题 I have the following below path data which is in xaml. I want to define the same path data from the code behind. <Path Data="M 250,40 L200,20 L200,60 Z" /> 回答1: From Codebehind : Path orangePath = new Path(); PathFigure pathFigure = new PathFigure(); pathFigure.StartPoint = new Point(250, 40); LineSegment lineSegment1 = new LineSegment(); lineSegment1.Point = new Point(200, 20); pathFigure.Segments.Add(lineSegment1); LineSegment lineSegment2 = new LineSegment(); lineSegment2.Point = new Point

How to switch UI Culture of data binding on the fly in Silverlight

懵懂的女人 提交于 2019-12-18 18:03:06
问题 I have a TextBlock control, which is data bound to DateTime property. The text displayed something like this: Thursday, October 21, 2010 I need to switch UI Culture on the fly, using something like this: Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentUICulture = new CultureInfo("de-de"); I've tried this to force binding to recalc: var bindingExpression = textBlock.GetBindingExpression(TextBlock.TextProperty); bindingExpression.UpdateSource(); But I still see Thursday

How to set up RIA services with Silverlight 4.0 and without EF

萝らか妹 提交于 2019-12-18 13:38:30
问题 As a Silverlight newbie, I am finding it really hard to set up an RIA Web service. The examples available on the web almost always refer to Entity framework as the ORM but we are using NHibernate as our ORM. I am aware of the tutorial by Brad Abrams where he uses NHibernate as the ORM but most of it goes above my head because I am also a newbie at NHibernate and some of the concepts of RIA are not clear to me e.g. DomainService. I'd like to first keep it simple and ignore the ORM at the

Showing custom tooltip?/Popup when hovering over an object in Silverlight

核能气质少年 提交于 2019-12-18 13:31:31
问题 How can I go about getting similar popup/hover/tooltip ( see image below ) when I hover or click on an object in my Silverlight app? Update: ( added bounty ) I am looking for a control which can drop a shadow and show the arrow. I want like 3-4 lines of data which I can pass in as the control's properties. popup exampe http://www.freeimagehosting.net/uploads/4a78a786fc.gif 回答1: Expression Blend 4 has this kind of callout shape and you can apply a <DropShadowEffect/> to it. To put text inside,

Silverlight Constructor Injection into View Model + Design Mode

99封情书 提交于 2019-12-18 11:12:19
问题 Im trying to get to grips with writing testable ViewModels in Silverlight 4. Im currently using MVVM light. Im using AutoFac and the IoCContainer is doing its job fine. However to inject into the constructor of ViewModels, which are bound to Views I have this constructor chaining: public UserViewModel() : this(IoCContainer.Resolve<IUserServiceAsync>()) { } public UserViewModel(IUserServiceAsync userService) { if (this.IsInDesignMode) return; _userService = userService; } Which doesn't feel

Convert Audio samples from bytes to complex numbers?

我怕爱的太早我们不能终老 提交于 2019-12-18 07:15:31
问题 Greetings everyone, I am currently developing a chromatic tuner for instruments/voice in Silverlight with a C# back-end. I am in the beginning stages and am having issues in grabbing the audio data. I am using an AudioSink class to write the audio to a memory stream when the live capture starts. The problem I am having is converting those bytes in the stream to complex numbers so that it can be fed into a FFT algorithm. I have tried the various way discussed in this post Problem to convert

HLSL for getting cylinder effect

帅比萌擦擦* 提交于 2019-12-18 07:14:53
问题 I need to write an application with Silverlight 4 and need to show images like wrapped on cylinder. I need some HLSL code, as I wont to do that with Effects of Silverlight. I don't wont to do that with 3D libarries for silverlight. I only need HLSL code for changing pixels. I need for my image to look like this Thanks. 回答1: This seems to be the effect you want, you may wish to change the 0.2 value to increase or decrease the effect or make this adjustable in your shader but that's a simple