Free control - Hybrid LinkLabel and HtmlTextBlock for Silverlight 3 - silverlight

I need a simple HTML renderer ( like HtmlTexBlock ) which also allows to intercept click on custom defined link ( like LinkLabel ) looking like hyperlink. Does anything like that exist as free software ?

I don't know of any but if you only want one link in your html text could you maybe template a button using the htmltextblock as the content and capture the click event and navigate to desired page. I know it will not work if you have multiple links in your html text however it is unclear what your exact requirment is.
eg.
<Button x:Name="btnhtml" Width="63" >
<htmltextblock Text="Hello World"></htmltextblock>
</Button>

Related

How to create React Modal that doesn't have any overlay?

I am using React and Semantic UI for my website and I'm looking to create a modal popup to provide some action items on the page.
Currently, with Semantic's Modal, you must choose between three dimmer options (Default, inverted and blurring). In my case, I want the pop-up to appear, but I don't want ANY overlay. The page behind the model should appear as normal. Strangely, this isn't easy/obvious to implement.
On my page, I have the following example model code.
<Modal dimmer="inverted" size='mini' open={this.state.modalopen} onClose={this.onClose}>
<Modal.Header>Select a Photo</Modal.Header>
<Modal.Content image>
<Modal.Description>
<p>Some contents.</p>
</Modal.Description>
</Modal.Content>
</Modal>
The three options (default,inverted and blur) obviously don't work.
I have tried using styling to set the background color to transparent and other optoins, but nothing seems to work.
<Modal style={{backgroundColor: "transparent"}} dimmer="inverted" size='mini' open={this.state.modalopen} onClose={this.onClose}>
I know there must be an easy solution here..what is it?
Thx for your help.
Is used to be possible to set dimmer={false}, but this is deprecated (see link below) according to the documentation, and you will need to use styling in order to make it transparent, so your solution is close to what you need to do. If you inspect the rendered Modal, you'll see that you need to override the background-color of the .ui.dimmer css class. You should be able to do that in your component's stylesheet.
https://github.com/Semantic-Org/Semantic-UI-React/pull/2882

How to switch a tab menue on button click in react.js

I have a component of header in react and in the same way a component of tabs in another file. I integrate them in app.js . Now I want to change the tabs on click of the header buttons. How could it been possible can anyone help me in this regard.
I have tried it through giving an ID to the tabs and tried to open the tab by calling that ID in href using anchor tag around the tab buttons. But this way can't help me in to open tabs.
https://codesandbox.io/embed/shy-grass-l9n7m
I noticed you are using jQuery to set the tab value. I suggest using React for that with something more like this: https://codesandbox.io/embed/morning-water-dit63
Note: The above code is very rough because I just through it together by modifying your code. For example, I used the active and fade class names to set the visibility of tab content where personally I might have done conditional rendering like this:
render (
// tabs
{this.isActive('home') && (
// tab content here
)}
)
Alternatively you could use a library to handle it like https://reactcommunity.org/react-tabs/

Convert angular view into image for clipboard

I would like to render a view from an Angular directive into an image so that a user could right click on it, and copy it to clipboard. Basically I have a directive that compiles information into a nice Bootstrap scaffold with styling and would like to be able to right click, copy to clipboard, and paste into a document as a img type.
Imagine:
<div class="fancyCss">
<MyCustomHeaderDirective2 dataVal="foo"></MyCustomHeaderDirective2>
<MyCustomBodyDirective2>
<div class="row">
<- Content ->
</MyCustomBodyDirective2>
</div>
So On the page they load up the correct 'foo', see the fancy table, right click, and voila, jpg of table in your clipboard. Currently the process is render, get out snipping tool, click and drag,copy, paste.
For clarity: IS this possible? Does a library exist for this? Most importantly, how do I implement this with an angular directive?
If you are looking for pure client side solution:https://html2canvas.hertzen.com/
Alternatively for more customisable and foolproof solution, you can pass your DOM with inline styling to the server side and render it using phantomJS. Take a snapshot, save it as an image and send back to client.
There is a library available
http://hertzen.com/experiments/jsfeedback/
http://html2canvas.hertzen.com/
How it works
It capturing the html dom content and pasting inside a canvas
In Canvas you can convert the content to image format

Is there a WPF equivalent for ToolStripButton?

I'm learning WPF and have been trying to create a toolstrip. Is there a direct equivalent of the WinForms ToolStripButton or is the correct way of use just to add a normal button and format it?
I've found that Microsoft have a page that lists WinForm controls and their WPF equivalents here but that doesn't mention the toolstripbutton.
You can just put buttons inside a ToolBar and it will change the style of the buttons to make them look like a toolbar.
<ToolBar>
<Button>Save</Button>
<Button>Open</Button>
</ToolBar>
Looks like this:
If you want images in the buttons, you have to do the normal thing of modifying the content of the button.
<Button>
<Image Source="..." />
</Button>

How to navigate without HyperlinkButton beatween two pages?

I created two pages on my scratch silverlight application.
The two pages are appear on the mainPage ( mainPage is a UserControl ).
Now, i want to see the page1 on the top and navigate to page2.
I can't add HyperlinkButton.
How can i add the page 2 ?
And how can i navigate to page2 from page 1 ( can be from the mainPage that contain the page1 & page2 )
I try evrything and nothing work.
The code
<navigation:Frame x:Name="FrameNavigator" Source="/Views/page1.xaml" >
// need somehow to add here page2
</navigation:Frame>
Are you trying to show both pages at once? And why do you not want to us a Hyperlink button. If you want the user to be able to click on something and go to page2, but you don't want it to look like a HyperlinkButton, you can replace the Content of the HyperlinkButton.
<HyperlinkButton.Content>
<Image ... /> <!-- or whatever --/>
</HyperlinkButton.Content>
If for whatever reason you don't want to use HyperlinkButton, you can navigate from code.
FrameNavigator.Navigate(uri);
Please be more specific as to what you are trying to do and I can give a better answer.
Thanks,
I solve this problem in this way
Frame2.Navigate(new Uri("/Page1.xaml", UriKind.Relative));
Use Button Control for this
On click event you can navigate page in frameby
NavigationFrame.Navigate(uri)
try this
NavigationService.Navigate(new Uri("/MissionsPage.xaml", UriKind.Relative));
I am new to xaml and am just now starting to realize the design capabilitys so I do everything else in the code behind just make sure you have
using System.Windows.Navigation

Resources