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
|
Hi, I am starting to work with the controls in my application and I am not sure why I am getting the following error message. Error 7 Could not create an instance of type 'CurrencyTextBox'. My XML user control does have xmlns:ms="http://namespaces.mindscape.co.nz/wpf" <ms:CurrencyTextBox Grid.Column="1" Grid.Row="8" Name="mTxtSellPrice"/>
|
|
|
Please disregard this posting for figure out the problem. I just needed to add the "licenses.licx" item to my properties folder. Sorry for not reading directions.
|
|
|
Hi, I thought that I has figure out this problem. I have copied the licenses.licx to my properties folder. I am getting this error message. Error 24 Exception occurred creating type 'Mindscape.WpfElements.SpinDecorator, Mindscape.WpfElements, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0a92c4b7d9c14aa4' System.ComponentModel.LicenseException: An instance of type 'Mindscape.WpfElements.SpinDecorator' was being created, and a valid license could not be granted for the type 'Mindscape.WpfElements.SpinDecorator'. Please, contact the manufacturer of the component for more information. C:\Development\trunk\Client\Properties\licenses.licx 12 Client
|
|
|
Hi, I thought that I has figure out this problem. I have copied the licenses.licx to my properties folder. I am getting this error message. Error 24 Exception occurred creating type 'Mindscape.WpfElements.SpinDecorator, Mindscape.WpfElements, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0a92c4b7d9c14aa4' System.ComponentModel.LicenseException: An instance of type 'Mindscape.WpfElements.SpinDecorator' was being created, and a valid license could not be granted for the type 'Mindscape.WpfElements.SpinDecorator'. Please, contact the manufacturer of the component for more information. C:\Development\trunk\Client\Properties\licenses.licx 12 Client |
|
|
Please check that licenses.licx is included in the project and that its Build Action is set to Embedded Resource. Also note that if you are building your user control as part of a DLL, then the EXE that consumes that DLL must also have a reference to WPF Elements and a licenses.licx file. For a general checklist on licensing exceptions please see http://www.mindscape.co.nz/forums/Thread.aspx?ThreadID=1309. It's written in terms of the WPF Property Grid but the same techniques will apply to WPF Elements. If this still doesn't help then could you zip up the project and post it for us to look at? (You can attach a file via the Options tab.) Thanks! |
|
|
Hi Ivan, I have attach a project for you to review. Thanks for your help.
|
|
|
Hi Robert, The problem appears to be that the licenses.licx file is empty. You should copy a licenses.licx file from one of the sample projects, or include the following text (each entry on one line): Mindscape.WpfElements.CurrencyTextBox, Mindscape.WpfElements, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0a92c4b7d9c14aa4 |
|
|
Hi Ivan, I did that and I still get this error message. Error 7 Could not create an instance of type 'CurrencyTextBox'. I also copy the "Licenses.licx" item from the sample folder and I get this error message. Error 24 Exception occurred creating type
'Mindscape.WpfElements.SpinDecorator, Mindscape.WpfElements,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=0a92c4b7d9c14aa4'
System.ComponentModel.LicenseException: An instance of type
'Mindscape.WpfElements.SpinDecorator' was being created, and a valid
license could not be granted for the type
'Mindscape.WpfElements.SpinDecorator'. Please, contact the
manufacturer of the component for more information.
C:\Development\trunk\Client\Properties\licenses.licx 12 Client
I also was able to add a control and delete a control and the "Licenses.licx" is getting updated but I get this error message. Error 7 Could not create an instance of type 'CurrencyTextBox'. However, I only get the error message when running the application.
Any ideal what to do next.
|
|
|
I think from your .csproj file you are referencing the Mindscape.WpfElements DLL at the project location. I.e. you have copied the DLL from the Program Files installation directory to the project directory and are referencing it there. Is that correct? If so you must also copy the .lic file to the DLL location. Visual Studio looks for the .lic file in the same folder as the DLL. If that doesn't help then could you post your updated licenses.licx file please, and also the stack trace and inner exception associated with the Error 7 you're getting? Thanks! Also, can you confirm whether this is a single-project solution (a single EXE project like the one you sent me) or a multi-project solution (e.g. a DLL of user controls and an EXE to host them)? Finally, I am a bit unsure as to the build status of your project. You say you are getting error 24 which appears to be a compile-time error and would presumably result in no output. But you also say you are getting error 7 at runtime which implies that your project has successfully built. Sorry if I am being dumb here, but could you clarify at which stage (compile time or run time) you get these errors? Thanks! |
|
|
Hi Ivan, Your info was helpful. Thanks Again for your help.
|
|
|
hi, can u help me? i have wpf project with some user controls. setting <UICulture> make my user control unusable in window i have xmlns:my="clr-namespace:ATM_Cash_Management.OvladaciPrvky" Title="Window1" Height="300" Width="300"> <my:SeznamATM_Zakladni x:Name="seznam"></my:SeznamATM_Zakladni>then and exception is that he couldnt create an instance of my:SeznamATM_Zakladni SeznamATM_Zakladni is user control if i delete from .csproj file its good but i want to localize this application thank for help. Dana Hronova Czech Republic |
|
|
Hi Dana, Usually a "couldn't create instance of control" exception has an InnerException property that provides more detail about the problem. Check the exception detail dialog and see if it provides anything. If this only occurs when you set the UICulture property, then possibly the SeznamATM_Zakladni control is doing something that attempts to load resources, and these resources are not available for the target locale? Also, you say you are "setting <UICulture>" but you don't say where you set it. Are you referring to FrameworkElement.Language? Or is this to do with the msbuild UICulture property? |
|
|
Hi and thank u, i set the uiculture element in .csproj file. and yesterday a find the reason, that designerh doesnt new about SeznamATM_Zakladni. if i set AssemblyInfo.cs [assembly: NeutralResourcesLanguage("cs-CZ", UltimateResourceFallbackLocation.Satellite)] and then it work. Hi. |
|