Hi Nic,
It’s logged as WJ-8703 and will be fixed in the next release.
In fact the file is named WebUserControl.Designer.cs and the workaround is quite easy.
Go to
C:\Users\<windows_user_name>\AppData\Roaming\Microsoft\VisualStudio\14.0\ItemTemplatesCache\Visual C#\Wisej\UserControlBase
You will find 4 files. One of them is named
WebUserControl.Designer.cs
You must rename it to
UserControl.Designer.cs
Hi,
Please find attached sample with http handler defined and options set. But I am not able to get http handler firing ?
When you drag or paste the inage TinyMCE converts it to Base64 and keeps it in the HTML content, but i would like to avoid this.
Can you help please, feel free to upload it to examples when you manage to fix it , we should save time and nerves for others.
Regards,
D
Hi,
Problem still goes on.
Thank you.
More here:
https://www.tinymce.com/docs/get-started/upload-images/
I have added this to the options
"images_upload_url": "TinyMCE-ImageUpload.ashx", "images_upload_base_path": "/images"
and added a simple handler:
public class TinyMCE_ImageUpload : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
var request = context.Request;
var response = context.Response;
if (request.Files.Count > 0)
{
HttpPostedFile file = request.Files[0];
var filePath = "images/" + file.FileName;
using (var image = new FileStream(request.MapPath(filePath), FileMode.Create, FileAccess.Write))
{
file.InputStream.CopyTo(image);
}
response.Write($"{{\"location\":\"{file.FileName}\"}}");
}
}
public bool IsReusable
{
get { return true; }
}
}
There are of course many options and variations. It’s just plain asp.net or mvc handlers. You can also use a php handler on the server.
Hi,
managed to see the issue. I can see that you are shipping these extension with Wisej install so I just need to reference it from there.
Thanx,
DiNo
Hi Dino,
are you using Visual Studio 2013 or 2012 ?
If yes, you need to add C# 6.0 support.
Find more information here:
http://alextselevich.com/2015/08/using-c-6-0-in-visual-studio-2012-and-2013/
Best regards
Frank
I suggest to use an IFramePanel. ArcGis is very large system and you should use it’s API directly. See attached sample.
You might also want to take a look at one of our blog articles to get another sample of using styles in Wisej:
https://wisej.com/blog/shadow_on_the_panel/
Best regards
Frank
That looks very easy.. I will try it. We can just execute that code on App startup, or redirect if the client changes their mind
Thanks
Mitch
That looks very easy.. I will try it. We can just execute that code on App startup, or redirect if the client changes their mind
Thanks
Mitch
Hi Alex, we are trying to reproduce, Frank will contact you directly.
Best,
Luca
See attached Wisej.Web.Ext.StyleExtender.
You can add the component “StyleExtender” to the toolbox in VS or simply add it to a top level container (Page, Form, UserControl). In the designer you will see that all controls being designed have a new “Style” property. It can be edited with the code editor. It’s a plain JSON object definition that lets you add any style. (some may conflict with the theme).
To set the border in the designer, type:
{
“border”: “5px solid red”
}
The extender is able to update the widget also at design time.
If you need to set a style programatically, do this:
this.styleExtender1.SetStyle(this.button1, new {
border = “5px solid red”
});
You can use any css name:
this.styleExtender1.SetStyle(this.button1, new {
borderWidth = “5px”
});
Use “borderWidth” not “border-width” when writing code since “borderWidth” is a valid property while border-width is not and in javascript when assigning css styles the property name is “borderWidth”.
HTH
Redirecting images is either managed by a theme, or a css file that needs to be changed in the html page that swaps images. It’s not easy to generalize that functionality. You’d have to build a sort of image manager. Having said that, I have a solution for you 🙂
I’d still use a single mixin with all your application images urls in there. Set the baseUrl to the default base url, say “images1/”.
In your app you can alter the loaded theme like this:
// retrieve the Images object from the current theme.
var prop = Application.Theme.GetType().GetProperty("Images", BindingFlags.NonPublic | BindingFlags.Instance);
dynamic images = prop.GetValue(Application.Theme);
// change the baseUrl value.
images.baseUrl = "images2/";
// to force a reload.
// if you alter the theme when the app starts you don't need to reload.
Application.Navigate("/");
I tried it and it works well.
Try this:
this.getChildControl(“pane”).getChildControl(“scrollbar-y”).setMarginLeft(10)
Where “this” is the HtmlPanel.
Hi Luca
Thanks.
What threw me was as you type, viewer.Font appears as only having {get}, however viewer.Font.Name appears as FontInfo {get, set}.
However just setting the Font Name works everywhere on the control, which includes both toolbars and report parameters, including the report loading spinner and the new print control.
Now this could be because I created a css file for the SSRS to match that of our rebrand, which you link in the SSRS WebConfig.
The font used on the actual reports stays unchanged which makes sense as this needs changing using Visual Studio report designer, for each report
Hmm.. It seems that Mixins really aren’t designed to be dynamically controlled by code.
So one other idea I was thinking about was as follows; maybe you could offer advice if it would work:
Basically the idea would be to switch the URL for all images in the form/control right after initialization.
Would that work? Maybe put this code in a base class and use the base class for all forms.
Is there any way to override the InitializeComponent method and have some of my own code running?
Mitch
I’d appreciate the sample StyleExtender – it sounds like it will do the trick for us
Thanks!
Mitch
You can set any css style directly on any widget. For example:
Eval(“this.getContentElement().setStyle(‘border’, ‘5px solid red’)”);
However the widget will not remember it if the user hits refresh. You have to save the style you want to use and call the setStyle method in the Update() overload.
Or use a property extender like the StyleSheet extender and add a “Style” property to all components on a container. I can send you a simple StyleExtender class that does that. It’s better to use extenders instead of adding virtually infinite web/css properties to controls and widgets. The javascript architecture in Wisej is extremely flexible and open.
We have a master page that has a container panel. That panel’s content is changed when a different menu item is clicked etc. The exception occured during the switch from one such panel and another. It makes sense that this is related to DataGridView because most of these “pages” have a DataGridView as their main component.
Cannot change the mixin by code (unless you write the file and reload and the mixin is not embedded). Mixins and the current theme are loaded and meshed together and then sent to the client only once as a single json file since they styles have to be converted to css and the properties and to be applied to widgets as they are created.
To change the baseUrl you have to change mixin. You can have a mxin with all the icons and the base url. Then have additional mixins that only change the baseUrl. The problem is that if they are all in the same /Themes directory then Wisej will apply all of the them at once.
There is a method overload Application.LoadTheme(theme, mixinx) where you can supply the base theme name and the list of mixins to apply. You can use to apply the base mixin and whichever mixin you want to use to change the baseUrl.
