This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I am trying to use the DropDownDatePicker as the editor for my datetime fields of my Mindscape WPF Property Grid. My WPF Property Grid is declared as follows: <ms:PropertyGrid Margin="0,0,0,0" x:Name="PropertyGrid1" IsToolBarVisible="True" Grouping="{x:Static ms:PropertyGrouping.ByCategory}" PropertyNameTemplate="{DynamicResource PropertyNameCellTemplateTabFriendly}" Style="{DynamicResource ENPSPropertyGridStyle}" Background="#FFFF1818" BorderBrush="#FF250F0F"> </ms:PropertyGrid> In my windows resources I have the following section: <DataTemplate x:Key="DateTimeEditor"> When my property grid loads I get the following error (note no inner exception): I have other custom editors that I've created and use in this exact fashion for other data types. It works great but for some reason this one is not working. I've got my .licx files in order (in the bin/debug directory along side the .dlls) etc. I'm stumped. Any thoughts? Sean |
|
|
Not sure what's going on here, as the following code is working for me: <Window.Resources> Your licensing file location sounds a bit odd: you should have one licenses.licx file, in the Properties folder, and the .lic files in the DLL reference location (not the output location). The error that you're getting doesn't sound like a licensing issue though, but may be worth double-checking these file locations just in case. Also check that licenses.licx contains entries for both the property grid and for *all* the Elements controls (not just the DropDownDatePicker). Hmm, is the property grid declaration in a DLL project that is referenced by an EXE project? If so try adding a reference to the WPF Elements assembly to the EXE project -- this may be a XAML variant of the "base class is defined in an assembly which is not referenced" compiler error. If that's not it, I'm a bit stumped too -- I can send you my project to see if it works for you, or if you could put together a small repro project then we can take a look at it. (You can attach zip files via the options tab, or email via the contact form, though please strip out all binaries and .lic files first.) |
|
|
Hey Ivan, Thanks for the quick response...I'm still working on it and here's some more info First, on licensing: When I don't copy the .licx files to the bin/debug folder I get the following error. System.Windows.Markup.XamlParseException occurred This is on all projects, in C# or in VB. I just right click on references, select browse, find the .dll's in the c:\program files\Mindscape directory and add them that way. Note CopyLocal is equal to true by default when you do this which is why it goes into the bin folder. The solution to this was in your "Licensing Exceptions FAQ" (http://www.mindscape.co.nz/forums/Thread.aspx?ThreadID=1309) number 1: The licence file is not present alongside the WPF Property Grid DLL. This can happen if you are referencing the DLL at a location other than the install location -- e.g. if you have copied it to a project Lib directory. SOLUTION: Copy the .lic file from the install folder to the reference location. In this case the reference location is the bin/debug folder since that is where the .dll goes to in Visual Studio (at least my setup, VS 2008 SP1 set to VB developer as default). Number 2 from that FAQ is to copy all of the entries from the licenses.licx file from the sample apps in the properties folder to my .licx file in my properties folder which I've done, so to answer your question, I do have all of the entries for the property grid and elements control in my licenses.licx file. Unfortunately the issue is still present. My property grid is declared in a .exe project. It is on a user control in the same project as the window that is using it, so this isn't a variant of the "base class" issue you mention above. I have created a test project that I was all excited to upload but unfortunately (at least for figuring this out) in my demo project the error is not occurring. I have setup the test project almost identical to my actual production appliation that I'm working on, I am a bit baffled right now. If you think of anything based on above let me know! I am going to keep digging. FWIW I have the Enterprise license of this so I have the code. I have not tried to get into that, I am on a tight deadline right now so my time to dig around is really limited. But if you have any suggestions on how I might be able to set this up to do some debugging through your code I'd be willing to give it a shot. Thanks, Sean
|
|
|
You should definitely not be needing to copy the .lic files to the output location (bin/debug). bin/debug is not the reference location -- the reference location is where the DLLs are being copied *from*, in your case C:\Program Files\Mindscape\.... Apologies for the confusion here. The error you get if you do not have the .lic files in the output location suggests to me that licenses.licx is not being built correctly. You have confirmed that licenses.licx is in the project Properties folder; could you check the Build Action for me (in the file Properties box)? Thanks! I still doubt this is related to the FilteringTextBoxBase error and I realise your time is tight, but it is something I'd like to resolve if only to rule it out (and to prevent you needing to distribute the .lic files). Unfortunately I can't reproduce this problem and therefore I'm a bit stuck as to what might be causing it. If you can't reproduce it in a test project then if you want (and if you can do so without getting bogged down in NDAs and things) you can email your production project to ivan @ the obvious domain name (please strip out all binaries first) and I would be happy to take a look at it. |
|
|
The build action is set to embedded resource, is that correct? I am trying to get some repro code together...it is just really odd what I'm seeing with this and what triggers it.
Sean |
|
|
Ok, in my prior testing all of the entries weren't present in the licenses.lic file. Now that they are all present it appears that I can make everything work witout having the .licx files in the bin/debug folder! Thanks. Also I was finally able to repro the problem in a small project. I'm going to clean a few things up and send it to your email address. Thanks again for your help! Sean |
|
|
Solved it! The styles for my Property Grid were located in a resource dictionary that is in a utility project, not in the project that my window was in. The utility project had a reference to the PropertyGrid stuff but not to the WPFElements stuff. Once the reference got added there the issue went away. So this is actually similar to the "base class is defined in an assembly which is not referenced" problem, although it expands upon this a bit. Basically if your styles are in a resource dictionary the project that contains that resource dictionary needs to have references to all of your controls, even controls that you aren't styling in that resource dictionary but that are part of a datatemplate in another control you are styling. What a long day, but in the end I got my licx stuff cleaned up and have this working. Thanks for your help, the process of going through getting repro code actually got me refactoring some stuff and cleaned up a few things so I guess I can go home late but feeling productive! Sean |
|
|
Great, I'm glad to hear that's resolved, and thanks for sharing the resolution -- we appreciate your taking the time to write it up. I do like XAML, but man, it desperately needs better debugging and diagnostics! |
|