I've got a user control (below), I'm binding the text to a datasource and instancing up a bunch of the usercontrols.
I want the size of the text to be the largest possible that will still fit in the bounds of the control. In Windows programming, I could measure the text size decrementing the font size until it fit the target dimensions....
I am using silverlight and want to dynamically generate a hierararchy tree in the following format :
Since Silverlight controls are lookless,how can I structure a template that ultimately look like the image?
...
I'm trying to render frames coming from an mkv h264 file in silverlight 3 by using the MediaStreamSource.
Parsing the mkv file is fine, but I'm struggling with the expected values for CodecPrivateData in SL, which has to be a string, while the PrivateData info from mkv is a binary element.
Also, I'm not sure about in which form the frame...
Is it not possible to use a SQLDataSource in an aspx page inside a Silverlight application?
...
Let me explain the problem with an example:
[ContentProperty("Questions")]
public class QuestionForm : FrameworkElement
{
public QuestionForm() { this.Questions = new Collection<Question>(); }
public Collection<Question> Questions { get; set; }
}
public class Question : DependencyObject
{
public static readonly DependencyPr...
How do I use a XAP file created in Silverlight in my ASP.NET application?? I mean what are all the registration and changes to be done in the pages in order for the Silverlight content to be displayed in my aspx page?
...
I'm trying to find a way to conveniently debug a Silverlight website when I'm not working inside the Visual Studio IDE. The following command almost works, but it seems to always attach the debugger in Native Mode rather than Silverlight Mode.
vsjitdebugger "C:\Program Files\Internet Explorer\iexplore.exe" http://localhost/
...
I have created a Silverlight project which also contains a Web project.
I have a few class files in my web project which use System.Windows.Point and System.Windows.Size data types and I am getting compile errors when I try to pass either of these types in a List like List<Point> in the Silverlight project. If I try without the List<> ...
Hopefully I phrased the question correctly. If not, let me explain. I want to bind an Image element's Source property to a the ImageUrl property of my DataContext object. Here is the XAML:
<Image
x:Name="EmployeeImage"
Grid.Column="0"
Grid.Row="0"
Grid.RowSpan="2"
Source="{Binding Path=ImageUrl}"
Stretch="Uniform...
I'm getting the following error every time my Silverlight application load and cannot figure out how to get around it. This error occurs right when the UserControl is loaded (but before the Source is bound). I've tried handling this error during the ImageFailed event, but it is not fired when this exception is thrown. What can I do?
<Im...
The new Silverlight 3 features page says:
Developers can now theme applications by applying styles to their Silverlight 3 applications and changing them at runtime.
But I can't find any information about this. I would like to create a theme for may app to define button styles/etc...
Can someone let me know how to do this or point m...
Duplicate:
How do I use Silverlight from ASP.NET?
How do I add some Silverlight content to an already created ASP.NET website?
...
I am trying to create a custom scrollbar and am using images as button.
For now a simple
I can handle the MouseLeftButtonDown and Up event just fine but what I'd like to do is while its held down, every so many millisecond trigger an event is fired.
I tried something like this but it isn't quite working. Suggestions?
public delegat...
Hi,
I've tried to Google for this but maybe I'm not forming my query right, 'cos I am getting a lot of nonsense and irrelevance back. Probably too simple a question. Apologies it's been a while since I last did Silverlight!
If I have a XAML element:
<Image Canvas.Top="128" x:Name="img4_7" Width="180.3" Height="117" Source="monkey1.jpg...
I have an Image, which is attached to some JavaScript on MouseEnter.
This all works fine. When user "Mouses Over", JS is called and storyboard runs as expected.
I also want to change the mouse cursor to a "Hand Pointer" when the user hovers over, probably I guess, this occurs in the same JS function.
Also, how do I change it back?
Ma...
Hi,
As the title says really. We are working on a Silverlight banner on a redesign of our site and the Silverlight content works fine in all browsers except Firefox 3 (PC v3.0.7,8 or Mac v3.0.8). The Add-in is marked as having been installed, however.
The problem page is at:
http://clearvision.programx.co.uk/Schools/Students.aspx
(Not...
I am attempting to unit test a silverlight 3 project. I am using:
Moq.Silverlight (3.0.308.2)
NUnitSilverlight (http://www.jeff.wilcox.name/2009/01/nunit-and-silverlight/)
When I write a test that does not use moq, it works as it should.
When I use moq outside of a test, moq works as it should.
(I mocked a interface and did a verify ...
I have a user control like;
<Grid x:Name="LayoutRoot">
<StackPanel>
<Grid Height="34" Width="92" Background="#FF000000">
<TextBox Text="{Binding Path=AbilityValue, Mode=TwoWay}" MaxLength="2" TextChanged="TextBox_TextChanged" TextWrapping="Wrap" HorizontalAlignment="Left" Margin="-5,5,0,5" Width="35" BorderBrush="#FF000...
Hi, I have written a webmethod that returns the list of the Users althought the service works fine, when I call it from the page the methods in the webservice have return type as void.
...
How can I separate Visual State Management from a Custom Control template?
I have one Custom Control, but with several different faces placed in templates.
All templates must have same state-based visualisation.
Is there any way to set my VSM once only? Otherwise I need to copy the VSM code in each template.
...