web controls in windows forms
-
Is there a way to have a windows form and add web controls to be able to use the bullet style change styles without needing for it to be on the web? I am new to programming and do not know asp.net, html, or WPF to do it one of those ways. Thank you
-
Is there a way to have a windows form and add web controls to be able to use the bullet style change styles without needing for it to be on the web? I am new to programming and do not know asp.net, html, or WPF to do it one of those ways. Thank you
To answer the question "can you use web controls in a Windows forms app?", to keep things simple, no, you can't. As Richard said, if you need to display bulleted data, you can look into a RichTextBox control. If you need to display something else, you're going to have to describe, in detail, what you want to display and in what format.
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave Kreskowiak -
Is there a way to have a windows form and add web controls to be able to use the bullet style change styles without needing for it to be on the web? I am new to programming and do not know asp.net, html, or WPF to do it one of those ways. Thank you
Technically, you can, although I would recommend against it. If you need a dynamic website, then you're going to need a webserver somewhere. If, however, your webpage is static, you can simply host a webcontrol in your form and point it at a local index.html file and that would be displayed. Saying that, while you could technically do this; save yourself a lot of pain, and use a RichTextBox instead.
-
Is there a way to have a windows form and add web controls to be able to use the bullet style change styles without needing for it to be on the web? I am new to programming and do not know asp.net, html, or WPF to do it one of those ways. Thank you
When refering to a "bullet change Style", maybe you're actually looking for a group of "radio buttons": [RadioButton Control Overview - Windows Forms .NET Framework | Microsoft Learn](https://learn.microsoft.com/en-us/dotnet/desktop/winforms/controls/radiobutton-control-overview-windows-forms?view=netframeworkdesktop-4.8) [RadioButton - WPF .NET Framework | Microsoft Learn](https://learn.microsoft.com/en-us/dotnet/desktop/wpf/controls/radiobutton?view=netframeworkdesktop-4.8)
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
-
Technically, you can, although I would recommend against it. If you need a dynamic website, then you're going to need a webserver somewhere. If, however, your webpage is static, you can simply host a webcontrol in your form and point it at a local index.html file and that would be displayed. Saying that, while you could technically do this; save yourself a lot of pain, and use a RichTextBox instead.
That's why I said "to keep things simple".
Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
Dave Kreskowiak -
Is there a way to have a windows form and add web controls to be able to use the bullet style change styles without needing for it to be on the web? I am new to programming and do not know asp.net, html, or WPF to do it one of those ways. Thank you
I have used a great resource for something similar. It doesn't support everything (such as css) but if you are looking to create html aware forms in Windows.Forms, the HTMLRenderer NuGet packages are perfect (you may be stuck with .NET Framework as the support for .NET Core is questionable). It is also specific to HTML 4.1. I believe it does support bulleted lists as long as you don't mind that you can't use CSS. (It says it can but CSS is only partially implemented so many of its features do not work). EDIT: Here is an image of an example control I made with these packages which make use of bulleted lists: ibb.co/6b4JSJQ
[edit]Link made visible (your choice if you follow it, but it seems to be some link shortening image site) : OriginalGriff[/edit]
-
I have used a great resource for something similar. It doesn't support everything (such as css) but if you are looking to create html aware forms in Windows.Forms, the HTMLRenderer NuGet packages are perfect (you may be stuck with .NET Framework as the support for .NET Core is questionable). It is also specific to HTML 4.1. I believe it does support bulleted lists as long as you don't mind that you can't use CSS. (It says it can but CSS is only partially implemented so many of its features do not work). EDIT: Here is an image of an example control I made with these packages which make use of bulleted lists: ibb.co/6b4JSJQ
[edit]Link made visible (your choice if you follow it, but it seems to be some link shortening image site) : OriginalGriff[/edit]
Be careful when posting links (especially links that look like link shorteners) - your original held what is called a "hidden link": no text so the link can't be seen, much less clicked on. Normally, that would have been an open-and-shut moderation, and your account would disappear as a spammer. If you must post image links, then expect two things: lots of moderation and false positive reports against you - particularly when the link looks like yours does and you can't tell what is at the other end. In deference to your length of membership, I spun up a VM to check it, but many will not want to do that and will report your account as spam instead. That will mean you get shown the door ... so it's in your interest not to look suspicious!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
-
Be careful when posting links (especially links that look like link shorteners) - your original held what is called a "hidden link": no text so the link can't be seen, much less clicked on. Normally, that would have been an open-and-shut moderation, and your account would disappear as a spammer. If you must post image links, then expect two things: lots of moderation and false positive reports against you - particularly when the link looks like yours does and you can't tell what is at the other end. In deference to your length of membership, I spun up a VM to check it, but many will not want to do that and will report your account as spam instead. That will mean you get shown the door ... so it's in your interest not to look suspicious!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
Ok... thanks for the heads up. I copied the embedded link provided to me by imgbb, not aware of this issue. I wanted to just embed an image but there doesn't seem to be a direct way to do that. I just wanted to demonstrate the capabilities of the solution I was proposing. The software I showed in the picture isn't even available... (at least not yet), so I am not sure how that could qualify as spam (other than in appearance).
-
Ok... thanks for the heads up. I copied the embedded link provided to me by imgbb, not aware of this issue. I wanted to just embed an image but there doesn't seem to be a direct way to do that. I just wanted to demonstrate the capabilities of the solution I was proposing. The software I showed in the picture isn't even available... (at least not yet), so I am not sure how that could qualify as spam (other than in appearance).
You can't post images directly, except in a very limited number of (highly policed) forums - this is a SFW site and nobody wants your corporate net nazis to get offended by some of the images that would get posted ... we have visitors that would post some truely offensive images if given the chance ... :~
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!
-
Is there a way to have a windows form and add web controls to be able to use the bullet style change styles without needing for it to be on the web? I am new to programming and do not know asp.net, html, or WPF to do it one of those ways. Thank you
I've just seen you post, so sorry for the late reply. The answer is yes, you can. Blazor WASM (Web Assembly) enables you to do just that. I have written an article recently that demonstrates this with WPF, however WinForms can do the same. Here is the article: Blazing.Mvvm - Blazor WASM & Blazor Hybrid using the Community Toolkit[^] - ignore the fact that the article focuses on MVVM. The key thing for you, in the article, is not only proof of concept, but also how you can interact with the Blazor part from within your WinForms app and vice versa. IT is made possible by the BlazorWebView control. Microsoft have an article that shows you how to host Blazor within WinForms: Build a Windows Forms Blazor app | Microsoft Learn[^]. Be aware though, to do this, you need to work with .Net 7.0+, not .Net Framework. However, if you need to move from .Net Framework to .Net, then your app will receive an immediate performance boost due to improvements made to .Net - no legacy support.
Graeme
"I fear not the man who has practiced ten thousand kicks one time, but I fear the man that has practiced one kick ten thousand times!" - Bruce Lee