|
Any of the replies here[^] helped?
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
|
|
|
|
|
You posted this only a few hours earlier. You have been a member long enough to know that behaviour like this is unacceptable in the forums. Now, pack it in.
|
|
|
|
|
I am developing a 4.0 WPF application. It works great under Windows 7, but it behaves strangely under XP:
In XP, when the app opens new windows, these windows are devoid of content in their client areas until I move them with the mouse. As soon as I manually activate the window with the mouse, then the client area gets painted. However this quirk does not show itself in Windows 7.
Could this be a bug in the XP implementation of WPF?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Not in XP itself. In your video drivers.
Remember, WPF handles all the drawing for you via software and hardware acceleration. Make sure you have the latest and correct video drivers installed. Also, in your Advanced Display Settings (can't give you the exact way to get to those because I am on Win7), but its in the Display Settings somewhere. I think there is an advanced button on one of the pages. Anyways, its that page with the big slider control on it that lets you slide to the left to disable levels of driver acceleration. This often fixes rendering issues like these, but also makes things slower.
Theres not much you can do about it other then update your video drivers and/or get a new video card with less buggy video drivers.
Not having buggy video drivers is *CRITICAL* with WPF.
|
|
|
|
|
Wow, thanks Mr. Sledgehammer. I hadn't thought of that. I'll see about updating the drivers and making adjustments.
I have to demo the app for the boss, and I don't want it doing that during the demo!
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
On the windows server 2003, I am trying to deploy a silverlight 4 / .net 4 application.
I get the error page not found when trying to browse to the page.
Are there any settings or installs I need to do on the windows server 2003 machine?
Thanks
|
|
|
|
|
We already know. Stop reposting.
|
|
|
|
|
This is now solved as I had to set the web service extensions to allowed for asp.net 4
Thank you
|
|
|
|
|
I'm missing something in my understanding of how to use DP validation and probably in custom control design in general.
Here's the problem:
I've created a numeric text box, yeah another one. One feature it supports is a flag for whole number vs real number support. Another feature is Increment, where an Increment is 1 for whole numbers and 0 to 1 for real numbers.
I have implemented Validation Callbacks as:
var propertyMetadata = new FrameworkPropertyMetadata(1.0, OnIncrementChanged, OnCoerceIncrementProperty);
IncrementProperty = DependencyProperty.Register("Increment",
typeof (Double),
typeof (NumericTextBox),
propertyMetadata,
IsIncrementValid);
public static readonly DependencyProperty IncrementProperty;
[EditorBrowsable]
public Double Increment
{
get { return (Double) GetValue(IncrementProperty); }
set { SetValue(IncrementProperty, value); }
}
private static object OnCoerceIncrementProperty(DependencyObject sender, object data)
{
var value = (Double) data;
var numericTextBox = (NumericTextBox) sender;
if (numericTextBox.IsWholeNumberOnly)
{
return 1.0;
}
if (value > 0 && value <= 1)
{
return value;
}
return 1.0;
}
private static void OnIncrementChanged(DependencyObject obj, DependencyPropertyChangedEventArgs eventArgs){}
private static bool IsIncrementValid(object value)
{
var val = (Double) value;
return val > 0 && val <= 1;
}
My logic actually works fine, the problem is that it does not play nice with wpf. For example, in the properties window, if I set the flag for whole number and I enter .5 for the Increment the property window updates as expected, back to one (silently, without an indication I entered a bogus value). However, the XAML still shows the .5. Aside from that the logic of the control works correctly, it ignores the .5. If I type in the XAML editor I get no warning that the value is bogus. I believe this behavior is due to the logic in the coerce callback.
If I set a value in the properties window or in XAML that fails the logic of the IsIncrementValid callback, such as 2, I get a warning from both the properties window and the XAML editor and the value is never set.
Apparently the coerce validation callback is working for the properties window but not the XAML. The IsIncrementValid callback is working in the XAML and in the properties window. Of course the IsIncrementValid callback applies to the type not an instance. So the behavior I need is for IsIncrementValid to apply to instances so I can base the evaluation of validity on another instance property. In fact what I need is to be able to apply the code in the coerce callback to the isValid callback.
Any suggestions that would shed light on how to do this correctly would be appreciated.
I would also appreciate any suggestions for eliminating the plumbing code for DP's. Other then the callbacks, DP's are very much boilerplate.
Thanks in advance.
modified on Wednesday, December 22, 2010 7:30 AM
|
|
|
|
|
Hi,
I need to add custom deserialization to my Silverlight 4 application, but I'm having a VERY hard time, any help will be appreciated (please send codes ). I have tried to implement IClientMessageFormatter at nausea, but no luck...
I've also noticed a search on CP for IClientMessageFormatter gives no results, which makes me think I'm on a wrong track...
Can anyone please point me at a nice sample SL (4) app that does this, or a good article that shows the implementation (e.g. the MSDN article tells you all about IClientMessageFormatter except give you a nice example on how/where to implement it your app, and I don't mean implement it in your class )
____________________________________________________________
Be brave little warrior, be VERY brave
|
|
|
|
|
Hii..
Could anyone plz let me know how to create Flow chart elements dynamically using SilverLight..
Thanks
Pari
|
|
|
|
|
All you neeed to do is create a shape object, either in XAML or in code, and then use that shape wherever applicable. Here's a link that discusses shapes and drawing:
http://msdn.microsoft.com/en-us/library/cc189073(v=vs.95).aspx[^]
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
this is the structure I have:
The development is done on my machine as follows:
using VS2010, silverlight 4
1- Silverlight application is created as a project
2- silverlight app has service references to the wcf project
3- web project is a simple project which has the clientbin folder and a default.aspx page
When running the .sln on my machine, all works fine.
I have copied the entire folders for both my wcf and web projects from my local machine into the c:\inetpub\wwwroot of the webserver (Windows server 2003).
on the web server, created two virtual directories. One for the web and one for the wcf project. each points to the appropriate folder under c:\inetpub\wwwroot
I made sure the endpoints in the file Servicereferences.ClientConfig under the wcf project in the webserver is pointing to the webservername:80
The webserver does have the correct mime file type i.e. .xap
I have also added the domain policy files onto webserver machine's C:/inetpub/wwwwroot/
In IIS, under the web project virtual directory, when I right click, browse, then it says "Page can not be found"
What have I done wrong please?
Thanks
|
|
|
|
|
When you run the solution is it the default.aspx page that is displayed?
|
|
|
|
|
yes.
Could this be to do with settings on the windows server 2003 machine that I am trying to deploy to?
|
|
|
|
|
Is this an issue on your machine, or someone elses. I have seen this through UAT.
|
|
|
|
|
solved by clicking on the publish to localhost
Thank you
|
|
|
|
|
Try accessing the .HTML page that is generated with the project. This will eliminate the ASP.NET part of it.
|
|
|
|
|
hello
I suppose there isn't an Open Source flow chart control for WPF? I been digging around for awhile, no joy.
Thanks
dev
|
|
|
|
|
You might find this[^] to be of some help.
|
|
|
|
|
See here[^] as well.
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 am new to Silverlight. I have a requirement to create an Xml from the DataGrid i.e. the Xml should have the data fetched from the datagrid rows. I need help on this.
Regards,
Noopur
|
|
|
|
|
This Link [^] may help you.
|
|
|
|
|
The concept seems fairly simple, assuming you do not want to use the underlying data object. loop through the columns to set the field names, then loop through the rows of the datagrid writing out the values.
I would probably use a combination of the 2 methods, use the datagrid to define the columns from the underlying data source to use then just write out the data.
There are plenty of articles about creating and writing xml to file the only challenge is assembling your data.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Member-4959176 wrote: I have a requirement to create an Xml from the DataGrid
Why? This is a very curious requirement, in that you have just effectively stated that the data is driven from the DataGrid rather than from the DataContext. If I were you, I'd use the underlying data to create the XML rather than the DataGrid. If you are using SL4, then the DataGrid uses UI and data Virtualization, so it's entirely possible that not all of the data is loaded in the grid, so it would be unwise to rely on it.
|
|
|
|