|
just to make it clear,
you wrote "as you suggested"
what I suggested ?
the URI way, and the full path name way
|
|
|
|
|
"as you suggested" means NOT embedding the sound file in the assembly by using build action "content" and "copy if newer", and setting the Source property to a full or relative path, as your first attempt.
e.g.: \Soundfiles\myfile.wav
|
|
|
|
|
Hello,
At present I have visual web developer 2010 express which I use for silverlight development.
Now I would like to instal the visual c# 2010 express for WPF development.
During the install I get the following error:
The following component could not be downloaded:
.net framework 4 multi-targeting pack
Any thoughts on how to solve this please?
|
|
|
|
|
|
Try installing .Net framework 4 before you try to install C# 2010 express.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
|
|
|
|
|
Hi!
i have a problem with ContentStringFormat
i get an error
The property 'ContentStringFormat' does not exist on the type 'ContentControl' in the XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation'.
The example i follow uses this namespace,
is there an other namespace i should use? Why do i get this error?
<UserControl
...
...
...
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<StackPanel Margin="2,2,2,2">
<ContentControl Content="{TemplateBinding IndependentValue}"
ContentStringFormat="{}{0:MMMM d, yyyy}" />
<ContentControl Content="{TemplateBinding DependentValue}"
ContentStringFormat="Visits {0:###,###,###}" />
</StackPanel>
|
|
|
|
|
Is your project targeting the .NET 3.5 (SP1) or .NET 4 runtime? If you are using VS2008 and the plain vanilla .NET 3.5, you won't see this property as it was added in .NET 3.5 SP1.
|
|
|
|
|
Hi!
i use VS2010, and the SL project targets Silverlight 4 and .Net 4
|
|
|
|
|
You should have said in your post that it was Silverlight rather than WPF. AFAIK, Silverlight does not support ContentControl.ContentStringFormat . This is a WPF feature.
|
|
|
|
|
|
I like the MVVM pattern and I have been keeping code in the ViewModel class. However, one thing is kicking my ass! When I make a mistake and the result of the databinding is not what I expect, I have no idea how to figure out what the hell is wrong! How do I debug xaml bidings?
-- Modified Thursday, January 13, 2011 9:29 PM
|
|
|
|
|
The output window looks ot be your best bet!
Very nice article here[^].
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
|
|
|
|
|
I use a combination of PresentationTraceSources and Snoop to view the bindings. With Snoop you can quickly find out if the DataContext has been set, and you can also use it to view the bindings themselves (along with so many other useful features).
|
|
|
|
|
Probably this can help
WPF Inspector
No experience with the product, but it's better than nothing!
|
|
|
|
|
I have developed a Workflow and published it as WCF webservice on IIS.
I then created a Silverlight 3 webapplication that references the published svc webservice.
The clientaccesspolicy.xml is in the wwwroot of the webserver.
When calling the silverlight webapplication, the call sometimes works perfectly and sometimes give the Async_Exception.
We have been struggling with this for a week now.
Appreciate any help in the matter.
Thanks !
|
|
|
|
|
My first guess would be that you are timing out. Try increasing the time variables in the configuration file to allow your service more time to respond.
|
|
|
|
|
Hello, my configoration TimeOut is set to 20 sec, the exception is geted after 4 sec....
Still, there is aprogress - The Error messages that reciving from the async method says:
"The content type text/html of the response message does not match the content type of the binding(text/xml; charset=utf-8). If using custom encoder, be sure that the IsContentTypeSupported method is implemented propertly.The first 1024 bytes of the response were: '...."
Thanks !
|
|
|
|
|
|
Add the following to the configutation section of the web.config file in the service's application. It should give you more information to debug.
<system.diagnostics>
<sources>
<source name="System.ServiceModel"
switchValue="Information, ActivityTracing"
propagateActivity="true">
<listeners>
<add name="traceListener"
type="System.Diagnostics.XmlWriterTraceListener"
initializeData= "c:\log\Traces.svclog" />
</listeners>
</source>
</sources>
</system.diagnostics>
<div style="font-size:smaller;">
I didn't get any requirements for the signature
</div>
|
|
|
|
|
Guys, I have been coding asp.net for almost 10 years now. I'm just finishing up my first production silver light application. It is a small application that I have spent a 10 days doing what I could have done in ASP.Net in one day. Personally, I like the WPF part of SilverLight an awful lot, but all the asynchronous service calls and magic (generated proxies etc...) to get Silver Light to work is mind boggling.
Yes, the UI is a bit quicker than my ASP.Net pages, but the amount of work to make it nice and the amount of hassle to get it working just doesn't seem worth it to me. What do you all think is the best platform to use for corporate LOB applications considering I can pretty much do whatever I want.
Oh, I will say this, regardless of what I choose to use in the future, I have learned a sh*t ton in the last two weeks about how to use events, delegates and Lamda Syntax. Also, I hate the lamda syntax for events. It makes reading code so confusing. I don't mind writing out a few extra lines of code, at least my brain doesn't hurt when I read it.
I didn't get any requirements for the signature
|
|
|
|
|
Well, WPF & Silverlight do have a rather large learning curve. Both also require you to change how you think when you write apps. If you tried to write a Silverlight app in an ASP.Net'ish way, yeah, it would suck. Just as if you tried to write a WPF app in a Winforms/MFC'ish way.
Both WPF & Silverlight are designed to be used with the MVVM pattern.
If you are using them in the "old school way", you aren't using them right .
Once you master data binding & XAML & triggers & events & control templates & styles, etc., your codebase will shrink by like 50% or more.
Lots of things that you had to implement in hackish ways in Winforms / ASP.NET are magically free in WPF / Silverlight.
I was recently offered a job by a well known and awesome company, but turned it down because it meant going back to C++ / MFC. No freakin way man! .
|
|
|
|
|
No, I understand they are nothing like ASP.Net. While I agree the overall code base would shrink, that doesn't help me much. I always get stuff done way to quickly in ASP.Net. I actually don't mind writing a bit more code when it is easier to understand / follow. Also, I think coding the tricky stuff is much more tricky in Silverlight.
I didn't get any requirements for the signature
|
|
|
|
|
Yeah, some stuff that was super trivial pre-Silverlight / WPF is now overly complicated. Something that took you one line of code in ASP.NET could take several hundred (or more) in Silverlight / WPF. Thats only a few specific areas though IMO. More often the case will be that something that took thousands of lines pre-Silverlight / WPF now takes one line.
If you use MVVM, I think you will find your code is amazingly clean and readable.
HOWEVER, be warned... MVVM has an initial "start up cost" and learning curve like Silverlight did. By "start up cost", I mean WPF and Silverlight don't give you everything you need to do MVVM out of the box. There are lots of libraries out there that fill in the holes.
Anyways... once you get past the initial learning curve of Silverlight & MVVM, the payoffs are huge. Lots of things that are easy in Silverlight / WPF can't even be done otherwise.
Once you truly harness the power of data binding, you'll wonder how you ever got along without it.
It would certainly behoove you to write a "MyBagOfTricks.dll" type assembly where you stick the "tricky" stuff in generic / reusable ways and take it with you from job to job and build it up over the years.
|
|
|
|
|
Thanks for replying. I want to harness the power of data binding, but please tell me, how do I debug the binding when the result on the page (or user control) is not what I expect?
<div style="font-size:smaller;">
I didn't get any requirements for the signature
</div>
|
|
|
|
|
May I suggest that you use, as the basis of your projects, the library that Marlon Grech and I wrote called MefedMVVM[^]? With it, you can create views in Blend with design time view models. A design time view model is one that displays data in the designer so you can see what your application looks like in a simulated runtime environment while you are actually developing it.
|
|
|
|