The state is “hovered”.
When you click on the checkbox (or radiobutton) icon in the ThemeBuilder it will select the inner “icon” component in the left tree. There you will see only 1 property “inherit”: “icon-dark”. It means that the “icon” component in the “checkbox” widget inherits its states, styles and properties from the “icon-dark” appearance.
When you navigate to the “Icon Dark” appearance (the dash is displayed as a space) you can see that the state “hovered” sets the text color of the icon, which Wisej applies to the monochrome svg icon. If you use pngs you need a different png.
If you change the textColor property in “Icon Dark” then all icons that inherit its values will also use the new values. You can simply override the inherited state by adding it directly to the “icon” component in the “checkbox” widget.
HTH
You need the new build coming up. Or comment out the method completely. The base Wisej.Web.Control already has a ValidateActiveControl() – which changed in the new build to take in consideration the values of AutoValidate and CausesValidation.
Hi Luca,
thank you for the explanation 🙂
Bye
Cristian
FF and Edge don’t support transitions on background images. I’ll see if it’s easy to implement an image fading switch. Not having the simple css transition makes it more difficult since you need 2 elements instead of one and rotate the images while fading one in and the other out and viceversa. With chrome is’s enough to set 1 css style.
I don’t know what is wrong with the code. I can tell you that the PdfViewer in Wisej returns a stream and it works. This is the source code from Wisej, in case it helps you find the error. The first part sends back a pdf stream, the second a pdf file.
/// <summary>
/// Process the http request.
/// </summary>
/// <param name="context">The current <see cref="T:System.Web.HttpContext"/>.</param>
void IWisejHandler.ProcessRequest(HttpContext context)
{
HttpRequest request = context.Request;
HttpResponse response = context.Response;
response.ContentType = "application/pdf";
response.AppendHeader("Access-Control-Allow-Origin", "*");
response.AppendHeader("Content-Disposition", new ContentDisposition() { DispositionType = "inline", FileName = Path.GetFileName(this.PdfSource) }.ToString());
if (this._pdfStream != null)
{
try
{
if (this._pdfStream.CanRead)
{
try
{
this._pdfStream.Position = 0;
}
catch { }
this._pdfStream.CopyTo(response.OutputStream, 1024);
}
}
catch (Exception ex)
{
LogManager.Log(ex);
}
}
else
{
try
{
string filePath = this.PdfSource;
if (!Path.IsPathRooted(filePath))
filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, this.PdfSource);
response.TransmitFile(filePath);
}
catch (Exception ex)
{
LogManager.Log(ex);
}
}
response.Flush();
}
There is a (hopefully) working sample in /examples.
I don’t know all the functionality of chart js, it’s here: https://www.chartjs.org/
Even tried this:
setting the PdfSource = http://localhost:64730/images.ashx (via a text box and button at run time)
My current .ashx handler:
try
{
System.Web.HttpResponse response = System.Web.HttpContext.Current.Response;
response.Clear();
response.ClearContent();
response.ClearHeaders();
byte[] buffer;
using (FileStream fs = File.OpenRead(@”c:\test\test.pdf”))
{
int length = (int)fs.Length;
using (BinaryReader br = new BinaryReader(fs))
{
buffer = br.ReadBytes(length);
}
}
response.Buffer = true;
response.ContentType = “application/pdf”;
response.BinaryWrite(buffer);
response.Flush();
catch (Exception ex)
{
string ls = ex.Message;
throw;
}
If i put that URL in my browser it comes up and shows the PDF so its definitely sending it out- but nothing shows in PDF.js at all.
I think I’m about out of attempts. Anyone done anything similar ? I thought this last try would work.
I set it to 26px, created an AutoSize label and it seems correct. Do you mean that when opening the window or page they are not scaled automatically if the font in the theme was changed?
So, When I set the pdfsource property from within the code to a file on thedrive like this: “c:\test\test.pdf” then PDF.js can load it.
I need to send it from a url like this: images.ashx?image=abc.pdf for example
The URL is from the same site right now – trying to at least get it working first.
I wrote a handler that does this (.ashx within the same application):
// context.Response.ContentType = @”application/pdf”;
// context.Response.WriteFile(@”c:\test\test.pdf”);
// context.Response.End();
System.Web.HttpResponse response = System.Web.HttpContext.Current.Response;
response.ClearContent();
response.Clear();
response.ContentType = @”application/pdf”;
response.AppendHeader(“Content-Disposition”, “attachment; filename=test.pdf;”);
response.TransmitFile(@”c:\test\test.pdf”);
response.Flush();
But pdf.js gives an error: Invalid or corrupt pdf file:PDF.js v2.0.480 (build: a7a034d8)
Message: Invalid PDF structure
Do you have an example on how to properly stream a file to pdf.js from a url ? (I tried 2 methods above – Googled it for a while, looks like i’m doing it correctly)
I attached a demo project.
In the project we have 3 html and json files. All files are embedded. Special case for adminWithExistingJson.json because this file will be also copied to the output directory. The LoadConfiguration event is in WisejHost.cs:159
When you launch it three browser windows will popup.
In the console output you will also see that only default and adminWithExistingJson are requested.
I hope this shows the problem.
Sorry, forgot. Here it is. This sample should get you started. You can refer to the .NET standard System.ComponentModel docs to explore the TypeConverters and UITypeEditor features.
IE doesn’t support the speak api. Try with chrome. Also, the extension supports speech recognition as well.
Wisej.Application.exe
Hi Valeriano,
You can use Application.Browser.Device to detect the device type.
Possible values are Desktop, Mobile, Tablet.
Best regards
Frank
Users are very complicated…
If we enter http://demo.wisej.com/CodeProject, open some wisej windows (ex. Open DataBinding Example) and then open new tab and also navigate again to http://demo.wisej.com/CodeProject the windows are already open. Like we have left the first tab. Now the user closes the wisej windows. But in the first tab the window is still available. But no matter what the user clicks within the DataBinding Example nothing happens. This is confusing for our users. If you open google.com, do something and open a new google tab it has no impact on the first tab. But the browser passes the same session (cookies).
With favorites I mean the browser favorites (IE) or bookmarks (Chrome & FF). Where you “remember” a page and by clicking on it the browser navigate to it. In cookieless we have the ?sid parameter included in the favorite. Our users have links like http://demo.wisej.com/CodeProject#Control1 and http://demo.wisej.com/CodeProject#Control2/objectid as favorite to allow a quick navigation to specific functions to our app. With cookieless the sid is included in the link. Therefor we have the same problem again.
Using the window.sessionStorage would be perfect because then the sid would not be visible in the url and multiple instances would be possible.
Thank you very much
I’m not sure I understood the issue. Can you send me some steps to reproduce?
Also with the LoadConfiguration event you don’t even need a json file. You can simply create Configuration object from the json definition and return it instead of assigning the file path. It lets you store the json config in an embedded resources or build it by code.
The HostService extension is provided with the source code to be compiled to match your requirements. There are many OWIN middlewares that you can add to your host service to add authentication, filtering, logging, etc. Basically it lets you build your own web server with the features you need. The one we provide is the base skeleton. For example, we have included the file system middleware to browser files, but you may want to remove it.
The same goes for the Standalone exe. We provide the basic window and two options (IE and Chrome). Usually a final project wants to change the logo at startup, the loader, the exe icon, and maybe add a toolbar or status bar or other controls.
You also may want to change the default port. Or may want to handle certain requests in a custom way. To compile it you need VS2015 because the code uses some constructs available with the C# 6 compiler.
I have attached the precompiled exe. Please be aware that Windows 10 (or maybe also 8) will block any service trying to listen to 80 and all domains. So if you want to start the service listening to * and port 80 you need to start it as admin.
See also https://wisej.com/blog/self-hosting-and-standalone-web-apps/
To start the one I attached:
We are using it here: http:/demo.wisej.com:8080
Users want different things 🙂
Sharing the session cookie among tabs it’s not a Wisej feature. All browsers do that and all web systems that use session ids in cookies have the same behavior, including ASP.NET/MVC, PHP, JSP. It gets mitigated if you use URL navigation with ASP.NET, but most apps use update panels and single page and end up in the same place.
The refreshActiveTab option is meant to sync tabs and avoid messing up applications that were not designed to operate on multiple tabs. It’s documented but it’s not online yet.
The only way to differentiate a session between tabs is to use the cookieless option. I don’t understand what “favorites” are and how it makes the cookieless option not work? Any javascript based option doesn’t work because a refresh loses everything stored in memory and you are left only with the URL to distinguish sessions.
A new option could be to use window.sessionStorage for the session id cookie. This one is isolated for each tab. I can log an enhancement issue.
Hi Tobias,
yes, see “notSupportedUrl” in default.json
Best regards
Frank
Can you please provide my a short answer please ? This features has been asked by a customer and I want to provide any feedback.
Thank you.
