How can i put '<3 like' in a hyperlink in windows phone 8? <3 will be appbar icon.
I have tried to put image in text block but i could not succesful.
Look at the applicationbar sample that is in every new app you create. There you can see how an image is inserted as the background for a button. When the button is clicked you can use the webclient in windows phone to start the hyperlink.
For doing th hyperlink you have to look into how to create an URL, also. But it is pretty simple.
Related
The websites are MVC C# with kendo UI. It is no problem with the computer and ios phone(iphone) devices.But on Android, if the user clicked the website's textbox, the keyboard shows up and the websites scrolls, the user can not see the focus of the textbox. On the computer and ios phone, the user clicks the textbox,the view stands still and does not scroll. So I use the following CSS code on javascript of cshtml to fix:
#media screen and (max-width: 580px) and (max-height: 350px)and (min-height: 200px){
html {
display:block!important;
overflow:hidden!important;
}
}
If the textbox has clicked, the keyboard shows up and makes view smaller. While the view is smaller, the view can't scroll and it reveals the same correct view with a computer device and ios phone. But, it is only correct on some Android devices.So how can I use CSS to make the view of the website does not scroll when the keyboard shows up on Android phone device? Thanks!
The following is success case in ios phone device:
1.website
2.select event and open event window
3.Scroll down to the textbox
4.scroll down the textbox and focus the the end part of the text in textbox ,then keyboard shows up.It's no problem on this ios phone case ,but on android phone case,it will scroll up to wrong place.
How do I display an image when I click a button ? Like MessageBox.Show, it will open a new window. Unfortunately MessageBox only do it on text. how about images ?
As a suggestion how about if you:
Create a new windows form instead with PictureBox inside.
Load the image on the PictureBox before showing it
Use Form.ShowDialog(this)
Return DialogResult upon clicking the buttons you define in your windows form
we can create image (or) pic to be clickable links by using this code
<a href="http://www.w3.org"><img src="w3c_home.gif"
alt="World Wide Web Consortium Home"
width="72"height="46"border="0"/></a>see in this blog
http://www.facebookliteapp.com/2015/06/facebook-lite-for-Android-pc-laptops.html
How do I implement my app to copy a certain set of text for Windows Phone 8 when I tap a button?
E.g. tap this button to copy a sms template
Something like that
I want to copy text from the app itself
Check this tutorial about copying text to Windows Phone 8 clipboard
Extras from it - assuming selectedText is text to copy:
DataPackage d = new DataPackage();
d.SetText(selectedText);
Clipboard.SetContent(d);
I need to add a hyperlink button that directs to a webpage to my metro style apps written with C# and XAML. As in Silverlight, there is no NavigateURI option. Is there any other option to make a hyperlink redirect to a specific webpage?
There's a sample in the Sample App Pack that does this.
// Launch a URI.
private async void LaunchUriButton_Click(object sender, RoutedEventArgs e)
{
// Create the URI to launch from a string.
var uri = new Uri(uriToLaunch);
// Launch the URI.
bool success = await Windows.System.Launcher.LaunchUriAsync(uri);
if (success)
{
rootPage.NotifyUser("URI launched: " + uri.AbsoluteUri, NotifyType.StatusMessage);
}
else
{
rootPage.NotifyUser("URI launch failed.", NotifyType.ErrorMessage);
}
}
I don't know about Silverlight but in WPF (almost same as SL) we have TextBlock whose inline tag is Hyperlink.
<TextBlock>
Some text
<Hyperlink
NavigateUri="http://somesite.com"
RequestNavigate="Hyperlink_RequestNavigate">
some site
</Hyperlink>
some more text
</TextBlock>
U said "as in silverlight there is no NavigateURI option in this". No Problem.
i didn't knew about this feature of NavigateURI b4. so what i did was when the user clicked on that link it called the browser to open my requested link. In mouse over i changed cursor to look like hand and text color as red and on mouse leave back to default color (Blue) and cursor (Arrow).
I think u got my point.
I blogged about wiring up HyperlinkButton in Windows8 XAML to launch internet explorer
http://zubairahmed.net/?p=266
Windows.System.Launcher has methods to open the appropriate app for a given Uri or StorageFile. Just wire that up to the click event of your button
Just in case somebody stumbles upon this:
I'm using Visual Studio 2012 RTM on Windows 8 RTM and NavigateURI is back and opens the default metro browser.
I am developing window phone 7 application in C# & silverlight 4. I am new to the silverlight.I have two buttons in my application for different purposes. I want to change the color of the button dynamically when the button gets clicked. So I am using the following code
IncomeButton.Background = new SolidColorBrush(Colors.Red);
But it is not working. Can you please provide me any code or link through which I can resolve the above issue ? If I am doing anything wrong then please guide me.
Changing the styling of a button from it's own click event comes with a catch. Peter elaborates here.
Why can't I change the Background of my Button on a Click event? - Peter Torr's Blog
You can simply execute IncomeButton.UpdateLayout() after changing button's color.
I also ran into that "simple" problem. Instead of using Peter's "button styling change" thing, I simply placed a rectangle below the button and changed it's color with the Rectangle.Fill property in the Click event of the button. Works fine for me.