Mouseover my title in xaml - xaml

Hi all i'm new to this xaml code so excuse me if.i ask some stupid question.
I have a title call conference with hyperlink that take you to conference paye and inside that conference page i have link and table in it.. All I want to so is to create à tooltip that will show the link and some info when the mouse is over it

Most elements in XAML have a ToolTip that you can set in XAML. Tool tips are automatically shown when the mouse hovers of the lement. You didn't specify what type of element your title is, but for this example I will use a Label.
To specify a ToolTip, set up your element like this:
<Label>
<Label.ToolTip>
<!-- put the elements you want in the tool tip in here -->
</Label.ToolTip>
</Label>
Hope this helps put you on the right track

<Label Grid.Row="0" Grid.Column="1" Style="{StaticResource LabelRequiredStyle}" Content="{Binding Value}", ToolTip="{Binding Value, RelativeSource={RelativeSource Self}}" >
Set this attribute to the lable and replace 'Value' with the value of content of Label.

Related

How to use TableView in Xamarin.Forms?

I am relatively new to the world of Xamarin.Forms and have a question with regard to Xamarin TableView.
I want to create a layout similar to the one shown below.
Question is, can I use TableView for this or is there an another option for this? Can anyone show this with XAML code please?
Thanks in advance.
Edit: Tabs in the bottom are not required.
I don't mean to be rude, but this is very easy to retrieve from the documentation pages and a bit of trying yourself.
To get you started, try this:
<TableView Intent="Settings">
<TableView.Root>
<TableView.Section>
<ImageCell Text="Invoice Customization" Source="Invoice_image.png" />
<ImageCell Text="Invoice Defaults" Source="Invoice_image.png" />
</TableView.Section>
<TableView.Section Title="Security">
<SwitchCell Text="Use Touch ID" />
</TableView.Section>
... etc.
</TableView.Root>
</TableView>
The arrows at the end of the cells and the footer text underneath the Security section are not possible with Xamarin.Forms out of the box, this will probably require you to write a custom renderer.

How do you turn a button in to an icon, in JSFiddle.

Needing some help for a school project, and trying to figure out how to change the ascetics of my buttons by inserting jepg s or even gif s. Thank you!
You can do it by specifing the inner content of the button or input as being an img tag
so normally <button>Submit</button> will create a button with submit as the text of the button instead you do this
<button id="btn"><img height="40" width="40" src="http://icons.iconarchive.com/icons/martz90/circle/512/google-plus-icon.png"></img></button>

x:name of controls in ApplicationViewStates

I am working in windows store apps and I need help..
I am trying to adapt my app for the differents visual state (FullScreenLandscape, FullScreenPortrait, Snapped, etc) and I need to reuse the controls for each visual state..
I create a grid for each visual state for example
<Grid x:Name="PortraitView" Visibility="Collapsed">
</Grid>
<Grid x:Name="FillView" Visibility="Visible">
</Grid>
<Grid x:Name="SnapView" Visibility="Collapsed">
</Grid>
but my problem is that I can not repeat the x:name of the controls that I set in the Grid= PortraitView..
how can I resolve it?
thanks
From MSDN
The most common usage of this property is to specify a XAML element
name as an attribute in markup. This property essentially provides a
WPF framework-level convenience property to set the XAML x:Name
Directive.
Names must be unique within a namescope.
For more information, see XAML Namescopes.

Windows 8 XAML Multilingual Translations

I've used the Multilingual Toolkit to translate my app and have been testing it using pseudo-language. It works fine for strings I have translated in code (C#) but I can't work out how to make it so that the tag in XAML is automatically translated.
I've been using http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh965329.aspx as a tutorial but I can't figure it out. I've also searched on Google but still no luck.
For example, I created a "Watermark" text box (which inherits from TextBox which shows some text in by default it the user has not entered any text and the item does not have focus. The XAML looks like this (I replaced generic positioning stuff with '...'):
<local:WatermarkTextbox x:Name="TitleTextBox" Watermark="MainPage_EnterATitle" ... Style="{StaticResource TextBoxStyle1}" />
As you can see it is setting a property called Watermark with a 'tag' of the resource name that is being translated using the Multilingual tool. I'm not sure how to get this to automatically translate.
Another example is using the bottom app bar buttons:
<Button x:Name="bottomAppBar_unpinFromStartButton" AutomationProperties.Name="MainPage_UnpinFromStart" Style="{StaticResource UnPinAppBarButtonStyle}" Click="bottomAppBar_unpinFromStartButton_Click"/>
And I can see in the link above that it says:
MediumButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name
But I'm not really sure where this is meant to go.
Even with a button, which seems like it would be the simplest to translate I can't get it to work. The XAML is:
<Button x:Name="RemovePhotoButton" x:Uid="MainPage_RemovePhoto" Content="" HorizontalAlignment="Center" Margin="222,0,974,78" Grid.Row="1" VerticalAlignment="Bottom" Width="170" Height="45"/>
But when ran in the app or viewed in the designed the button stays blank, with no text on it.
The Resources are set up like this:
And it is filling the translated documents fine:
I am able to translate it in C# using the code from the link above, just not using XAML.
Just wondering if anybody could help me out or point me in the right direction to solve this.
Thanks
First what i think is missing in the name of your resources is the property that you want to set. While never used it myself, i would understand it like this:
Your xaml needs to be changed to
<local:WatermarkTextbox x:Name="TitleTextBox" x:Uid="MainPage_EnterATitle" Watermark="" ... Style="{StaticResource TextBoxStyle1}" />
And your resource needs an entry with the key
MainPage_EnterATitle.Watermark
And about the part with the
MediumButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name
This is only used if the referenced property is an attached property. Like if your Watermark property would be attached not part of the control. But in your case its not important.

Silverlight - displaying graphical resources within a button

Has anyone solved this: displaying graphical resources within a button
create a resource, for instance a rectangle
<UserControl.Resources>
<Rectangle x:Key="myRectangle" Fill="Red" Height="100" Width="100"/>
</UserControl.Resources>
then set the content of the button to the resource
<Button Content="{StaticResource myRectangle}"/>
when you build inside blend 4 RC you get the error "Value does not fall within the expected range."
Visual studio does not show this error.
When you run the site the button doesn't show any content.
This technique works in WPF without problems.
Anyone got any ideas?
This can be done by directly setting the shape as the button's content. For eg:
<Button Height="120" Width="120">
<Rectangle Fill="Red" Height="100" Width="100"/>
</Button>
FrameworkElement.Resources are generally used for storing nonvisual elements, brushes, etc. For your case (I think) you'll need to store your xaml as a data template, again not sure if this works with Buttons, it is used for things like ListBoxes. See here:
resources description on msdn. The link further contains pointers to information for Data Templates etc.