|
I noticed that you're setting the Path to "*".
Any reason you not setting the Path to a DependencyProperty name?
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Hey Karl (btw mole rocks!),
When determining the foreground color i have to look at a couple properties of the object that i am binding to the listview. I found that adding 'Path=.' or 'Path=*' will pass the entire object to the converter class. Just to be sure, I tried it with 'Path=Status' but it didn't resolve the issue.
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
Thanks for the comments on Mole, really appreciate them.
I just learned more about the WPF Path statement too, thanks!
Can you posted your XAML and Converter code here or just make a screen shot and provide a link so that I can see everything in context.
I'm out for about 2 hours but will get back to you when I return.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Here you go (thanks again).
using System;
using System.Windows.Media;
using System.Windows.Data;
namespace Ups_Trak_System
{
public class BrushConverter : IValueConverter
{
#region IValueConverter Members
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
SalesAssociate associate = value as SalesAssociate;
if (associate == null) return Brushes.Black;
if (associate.Status.Contains("WITH")) return Brushes.DarkGreen;
else if (associate.Status.Contains("LUNCH")) return Brushes.Blue;
else if (associate.Status.Contains("GUEST")) return Brushes.DarkOrange;
else if (associate.Status.Contains("OFF") && !String.IsNullOrEmpty(associate.ClockOut)) return Brushes.DarkRed;
return Brushes.Black;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
#endregion
}
}
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
Can you post the XAML code too.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Here you Go[^]. Sorry about that.
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
I have built a C# project just like yours and it is working here. Didn't have any issues.
What is the exact message you are getting from the Blend?
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Here[^] Is the error message i am getting in blend. If you see the xaml screenshot posted earlier you'll see where the errors are. However, the DataTemplate does actually work and build. but with these errors i can't go rightclick on the listview and edit the other templates or styles.
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
I see what's up.
Your assembly name is, "Ups Trak System"
Your namespace is, "Ups_Trak_System"
What is the name of your output .dll?
Suggestion.
Name your assembly and name space either, "UpsTrakSystem" or "Ups_Trak_System"
This may be where Blend is all confused.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Karl, you are the man! I changed the assembly to "Ups", recompiled it, and opened it in blend and it displayed the listviews correctly w/ no errors. Blend doesn't like spaces in the assembly name. Thank you so much for your help i would have never figured it out!
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
Cool. I'm glad we got this sorted out.
teejayem wrote: Don't be overcome by evil, but overcome evil with good
Love this too.
Have a great day,
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Is their a way to sort of serialize the data of a WPF richtextbox to save the formatting of the text in the control so it can be sent to an Access Database? I am working in the .NET framework 3.0.
Any help would be much appreciated
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
You can take the output of the RichTextBox and convert it to an array of bytes and store it in Access.
You can Google: .net string to byte array
Here is one result:
http://www.chilkatsoft.com/faq/DotNetStrToBytes.html[^]
Then just write the bytes to a column in Access. Plenty of examples of how to store blogs in Access.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Hi!
please tell me about the Minimum Requirements for Silverlight. Is it code can be written using VS 2005 or i must need to VS 2008(orcas)...
|
|
|
|
|
fmlove wrote: Minimum Requirements for Silverlight
"Silverlight runtime" is the minimum requirement for viewing the Silverlight content in your browser.
For development, I will divide this into two subjects as below.
1. Minimum requirement for developing Silverlight
2. The best tools for developing Silverlight
1. Minimum requirement for developing Silverlight
- Software Requirement
There are currently two versions such as 1.0 and 2.0 Alpha for Silverlight. I guess, you won't need anything for developing Silverligth 1.0 project but you will need .NET framework 2.0 for compiling Silverlight 2.0 Alpha.
- Text Editor
You can write the codes with your favorite text editor. (Like you don't need VS for writing C# code.) In Silverlight, we use "managed code, XAML, Javascript, HTML" so those can be written with your favorite text editor.
2. The best tools for developing Silverlight 1.1 project
- Visual Studio 2008
- Silverlight 1.1 Alpha runtime
- Silverlight 1.1 Alpha SDK
- Silverlight 1.1 Alpha Tool for VS 2008
- Microsoft Expression Blend 2 December Preview (optional)
- ASP.NET 3.5 Extension (optional)
- Entity Framework and ADO.NET Data Service (Astoria) (optional)
You can use VS 2005 for developing Silverlight 1.0 but I suggest you to try Silverlight 1.1 (a.k.a 2.0). Because there will be huge differences between those versions. If you are using Silverlight 1.0, you will miss a lot of cool features of 2.0.
"Silverlight 1.1 Alpha SDK" will give you a few example of Silverlight 1.1 controls and etc..
"Silverlight 1.1 Alpha Tool for VS 2008 " will give you the silverlight project template and control/class library template. It will also give you the easiest way of integrating between ASP.NET and Silverlight.
"Microsoft Expression Blend 2 December Preview" - I used to use this tool for designing the Silverlight UI. There is no design view support for XAML so I used it as XAML Designer.
"ASP.NET 3.5 Extension" - I'm also new to this extension but Silverlight control from this extension is really helpful.
"Entity Framework and ADO.NET Data Service (Astoria)" - If you want to create data-driven silverlight application, you will need this. It allows you to use RESTful service in Silverlight application. I wrote a few posts about this in my blog.
Update:
Silverlight 2 beta1 is released.
Hope it helps.
modified on Friday, March 7, 2008 3:19 AM
|
|
|
|
|
Hi,
I'm trying to learn the WF architecture.
What I want to know is: Is there a way to access data stored in the workflow class?
I couldn't find a way to access this - even if I use the StateMachineWorkflowInstance-class
to access the CurrentState it's parents won't reflect the live-data (and of course if the workflow was persisted you cannot access the CurrentState at all).
So how can I get usefull information about the current state?
As an example let's say the worklfow handles a list with order and I want to get a list of all existing order ... the only hack I found was by implementing a event/method in a local service, invoking the event - handle the event and sending the information back via the CallExternalMethod.
So I handle the event using a ManualResetEvent to wait for the reply .... useless to say that this is .... not the way I want to do this in the future for simple data-requests.
And you can't just save the information in an external collection because the persistence-service won't see this stroage (only the data in the workflow).
Yes you can use a database to store the info and access the db - but I don't think this is good design.
Can somebody help?
|
|
|
|
|
Well - seems nobody got a clue ... no interesst in WF?
|
|
|
|
|
Interestingly when .NET 3.0 was called WinFX all the marketing buzz was about Avalon (WPF) and Indigo (WCF). When it got renamed as .NET 3.0 they then threw in WF and WCS. You could argue that WF was in a more complete state than WPF and WCF as regards tooling. Yet the latter two get all the attention and WF has been comparatively ignored! At work, for example, we're heavily into WPF and WCF but not WF - despite the fact that we could really make use of it. So I'm not surprised you aren't getting any answers here. Try asking in the WF forum in the MSDN forums. You're likely to get Microsofties popping up over there.
Kevin
|
|
|
|
|
Well I guess I will try the managed groups.
It's somewhat sad that WF don't get much attention - I think it has great potential.
|
|
|
|
|
CKnig wrote: I think it has great potential
Yes, that's what I thought when I played with it briefly in the period before my current contract. I spent some time with the book Pro WF by Bruce Bukovics which I thought was well written and comprehensive.
Kevin
|
|
|
|
|
Can i add window element into other window using xaml?
ISQ 469907496
|
|
|
|
|
Can you provide some more information, what exactly are you trying to do?
modified 27-Feb-21 21:01pm.
|
|
|
|
|
I have two window classes(2 cs files and 2 xaml). One of this windows is audio player. And i wanna insert one window(for example audio player) into some element of other window. How can i implement this?
ISQ 469907496
|
|
|
|
|
Make one of them a UserControl, then insert the UserControl in the Window.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
ok
but how can i do that?
Because i learning wpf only 4 days ) and i not a proffesional in it )
Or if you can write some references with this....
ISQ 469907496
|
|
|
|