|
Hello Blanchard...!
Where can i find the .DLL file in the solution...? It's not showing anywhere...? I just need to know how to add the customize tools by XML Coded File...?
Thanks
|
|
|
|
|
The 'StylesSheetFilename' key hasn't been found in the app.config file. Please, create this key (in the appSettings section) and set it to the (absolute) path of the styles sheet file to use.
="1.0"="utf-8"
<configuration>
<appSettings>
<add key="StylesSheetFilename" value="C:/style.xml"/>
</appSettings>
</configuration>
|
|
|
|
|
css is not implement on my from. i do not know why..
please help me
modified 15-Jun-15 8:45am.
|
|
|
|
|
Hello
I am not getting stylesSheetmanager in general in tool box i had been added styleSheetmanager.dll as a reference but still i m not enable to get stylesSheetmanager in general in tool box and also in label properties. what to do ??
|
|
|
|
|
="1.0"="utf-8"
<configuration>
<appSettings>
<add key="Stylesheet" value="Stylesheet.xml"/>
</appSettings>
</configuration>
xml file is yours..
i added a xml from add new item also the app config file from there.
What is going wrong i dont understand.
|
|
|
|
|
if i edit the property values in stylesheet xml file, the changes are not getting updated in the forms. wat should i do to refresh the style of a control??
|
|
|
|
|
I don't support anymore this component (because of time) but I can try to give you a start of solution.
I think that your new style isn't apply to the form because I don't reload the file if already loaded. Look at the following method in StyleSheetManager:
/// <summary>
/// Load the styles sheet file
/// </summary>
public void LoadStylesSheetFile()
{
// If not changed, we don't reload the styles sheet file
if (stylesSheetFilenameHasChanged || file == null)
{
if (!File.Exists(StylesSheetFilename))
throw new StylesSheetException(StylesSheetException.ExceptionType.StylesSheetFileNotFound, StylesSheetFilename);
file = new StylesSheetFile();
XmlSerializer serializer = new XmlSerializer(file.GetType());
TextReader reader = new StreamReader(StylesSheetFilename);
file = (StylesSheetFile)serializer.Deserialize(reader);
reader.Close();
}
}
|
|
|
|
|
source file is necessary for apply css?
modified 15-Jun-15 7:20am.
|
|
|
|
|
I want to change properties defined in the styles1.xml.
What should i do for that
Error is :
Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "StylesSheetManager.StylesSheetManager.resources" was correctly embedded or linked into assembly "StylesheetManager" at compile time, or that all the satellite assemblies required are loadable and fully signed.
pls reply me as soon as possible.
modified on Wednesday, September 21, 2011 3:07 AM
|
|
|
|
|
im getting the next error:
The 'StylesSheetFilename' key hasn't been found in the app.config file. Please, create this key (in the appSettings section) and set it to the (absolute) path of the styles sheet file to use.
but i had put the key in the app.config just like this:
<configuration>
<appSettings>
<add key="StylesSheetFilename" value="D:\estilos\Estilos.xml"/>
</appSettings>
</configuration>
and the xml is in this directory
any ideas?
thanks
<div class="modified">modified on Friday, July 29, 2011 7:57 AM</div>
|
|
|
|
|
Hi, Just change the name of App.Config to app.Config and that's all.
Andres Calderon
Bogota, Colombia
Verytel
|
|
|
|
|
This component is FREE so you can (and must) use it in your applications.
Best regards
Sylvain BLANCHARD
|
|
|
|
|
Can we use StylesSheetManager.dll for free? It seems it is developed by SbComponents. Can we use it in developing commercial applications?
|
|
|
|
|
Sorry to not reply before but I didn't maintain this component anymore (not enough time).
This component is FREE so you can (and must) use it for commercial applications.
Best regards
Sylvain BLANCHARD
|
|
|
|
|
can i get the code for StylesSheetManager.dll file
|
|
|
|
|
It will be great if anyone can guide me to resolve the below issue.
i am facing two issues with this
I added stylesheetManager into my mdiform and i have updated the app.config with the stylesheet xml file path under appsettings.
But when i try to build the application i am getting the below two errors
1. The type or namespace name 'Sb' could not be found (are you missing a using directive or an assembly reference?)
2. The 'StylesSheetFilename' key hasn't been found in the app.config file. Please, create this key (in the appSettings section) and set it to the (absolute) path of the styles sheet file to use.
but actually there is key with 'StylesSheetFilename' in app.config under appSettings node.
I am using dotnet 3.5. When i drag and drop stylessheetmanager into my mdiform, the below code is getting created in form.designer.cs
Private Sb.Windows.Forms.StylesSheet.StylesSheetManager
I am getting the first error in this line.
Thanks
Ram
|
|
|
|
|
Hi,
How to set a background image to a control ?
My image is an embedded image in the resources of the application. So,I don't want to type the path of the image in the value tag of the xml file.
The following line is giving error...
<Property Name="BackgroundImage" Value="(Image)Properties.Resources.page_bar25" />
Thanks
Panna
|
|
|
|
|
Hello. I have tried to drop the component on a .cs form within a Windows Mobile application solution but the component is greyed in the Toolbox and will not drop
On the contrary, it is dropped on a .cs form within a WinForms application
|
|
|
|
|
If the list separator is different of ; or the decimal separator is different of , it will not work and will force the users to change the Regional Settings or the styles files.
|
|
|
|
|
Yes, I will correct this in forcing the culture of the thread to English and change the styles sheet files format to English. So, the list separator will be always "," and the decimal separator will always be "."
Thank you for the information.
|
|
|
|
|
Hi,
Would it be possible to make StylesSheetFileManager a public class.
I have to throw StylesSheetManager class and use StylesSheetFileManager directly. My forms are all dynamically created (and modified), so StylesSheetManager could not work with them. I call StylesSheetFileManager.ApplyStyles() myself - seems to work just fine.
Thanks,
Best regards,
Tarpan
|
|
|
|
|
Because you can't drop StylesSheetManager on the form (which is dynamically created), I think you will have to create it manually as the following :
* declare a StylesSheetManager
* call StylesSheetManager.SetStyle() for the controls you want
* call StylesSheetManager.ApplyStyles()
Like this, I think you wouldn't have to set StylesSheetFileManager as public class.
|
|
|
|
|
Well, technically you are right, but it won't work.
Controls on the forms are not just dynamically created but dynamically removed as well. So the form appears as a blank window, then it reads it's definition from an XML file and creates the controls. Later on the form can be "redirected" to another XML file. So the form removes all the existing controls and creates new ones.
In this case I need not only SetStyle(), but also RemoveStyle() to unregister deleted control from the StylesSheetManager.
Also, can one StylesSheetManager handle multiple forms?
PS. Great Job! I use your codes as a guide to internal structure of .Net components. Can you help me with one simple (for you) question - how to create a object based on class _name_? I mean I have an variable that keeps a class Name and I want to create an object of specified class:
Dim myClassName as String
Dim myObject as Object
myClassName = "Label"
Object = new <... ??? ...> myClassName ' Creates new label
myClassName = "TextBox"
Object = new <... ??? ...> myClassName ' Creates new TextBox
(Please answer if you know the answer off hand.)
Thanks.
|
|
|
|
|
1) Q : Would it be possible to make StylesSheetFileManager a public class.
A : I will add a RemoveStyle method to StylesSheetManager which will permit you to call it for all the controls to be deleted. This metho will only do the following :
public void RemoveStyle(Control c)
{
if (propertyValues.ContainsKey(c)
propertyValues.Remove(c);
}
2) Q : Can one StylesSheetManager handle multiple forms ?
A : not really. Because StylesSheetManager has been defined as a IExtenderProvider, it must normally be dropped on one (and so only one) form.
3) To create a instance of a control (Label for example), do something like this :
Label lbl = (Label)Activator.CreateInstance(typeof(Label));
lbl.Text = "Dynamic label";
lbl.Visible = true;
this.Controls.Add(lbl);
|
|
|
|
|
RemoveStyle will help, but I have many forms dynamically loaded/unloaded, created dynamically based on XML definitions, designed by different programmers. I feel more confident to have one StylesSheetFileManager object created for the whole application, than bunch of StylesSheetManager objects for each form.
Just make it public, so if somebody (like me) wants to use it - let him use it.
PS. I'll think about inherit all my forms from a single parent, and put the StylesSheetManager in the parent class. Maybe it will be a better solution.
Thank you for the "Activator.CreateInstance()" hint.
|
|
|
|