Edit Tooltip of Slider in XAML - windows-runtime

Edit Tooltip design for Slider Control in WinRT XAML, Please click for referenceIs it possible to make the tooltip always visible?
Thanks in advance.

There's no way to change the slider's default behavior. You could consider showing the current value some other way, with a label or other visual.
For example:
<StackPanel Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<TextBlock Text="{Binding ElementName=slider,Path=Value}"></TextBlock>
<Slider x:Name="slider" Maximum="100"></Slider>
</StackPanel>

Related

Pivot Header Text Color in WP8.1

I am working on a windows phone 8.1 app, where I am not able to change the Pivot Text Header Color.
I have use below code in my pivot section, but here I can't use multi color in text blocks.
<Pivot.HeaderTemplate>
<DataTemplate>
<Grid Height="40">
<TextBlock Text="{Binding}"
Foreground="Black"
FontSize="28"
VerticalAlignment="Bottom"/>
</Grid>
</DataTemplate>
</Pivot.HeaderTemplate>
Note : I need a solution for windows phone 8.1 and also I want to change the text color not the background color.
If you want different colours in every textbox have a look at this, you'll have to use a converter
How to highlight dates in a TextBlock MVVM Light

Windows Phone 8.1 scrolling image gallery

I'm creating an image gallery that users can view by swiping an image to the left or right (horizontally) to see the next (or previous) image. Ideally, the image would snap into place like a hub section. I don't want to use a hub, however, due to memory concerns, as well as a hub isn't meant for this purpose.
I'm getting the first image to load, but I cannot swipe or move to another image in the collection. The first image loads, and I cannot slide it left or right.
Any help or suggestions would be appreciated.
Here's my relevant code:
ViewModel
Images = (await _service.GetImages(sectionId))
.Where(i => "Image".Equals(i.Type))
.SelectMany(sr => sr.Images
.Where(ii => "Standard Resolution".Equals(ii.Type))
.ToList();
(This above code successfully returns a list of image objects.)
XAML
<Grid x:Name="ImagesLayout" Grid.Row="1" Height="250">
<ListBox ScrollViewer.HorizontalScrollBarVisibility="Visible"
ItemsSource="{Binding Images}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate>
<Image Source="{Binding Url}" Stretch="Fill" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
Here's a good article that outlines exactly how to implement an image carousel for Windows Phone 8.1. http://www.captechconsulting.com/blogs/windows-81-image-carousel

Get the effective backcolor of app bar in WP8

I'm trying to implement a custom popup menu for one of my app bar icon button (something like the PhoneFlipMenu tool). I'm using a vertical StackPanel for that:
<StackPanel x:Name="popupMenuListCommands" Grid.Row="1"
Orientation="Vertical" VerticalAlignment="Bottom"
Background="{StaticResource PhoneDisabledBrush}"
Visibility="Collapsed">
<TextBlock Text="menu item 1" Style="{StaticResource PopupMenuListCommand}" />
<TextBlock Text="menu item 2" Style="{StaticResource PopupMenuListCommand}" />
</StackPanel>
It is shown when the user presses the app bar button:
void appBarIconButtonList_Click(object sender, EventArgs e)
{
popupMenuListCommands.Visibility = Visibility.Visible;
ApplicationBar.IsVisible = false;
}
There are 2 problems:
1) How can I retrieve the effective color of the application bar to use it in my stack panel? ApplicationBar.BackgroundColor returns #00000000, but obviously the effective color of the app bar background is not this. For instance, it is a dark gray when the dark phone theme is on.
If we cannot retrieve this color dynamically, perhaps, we just need to hard code 2 color values for the dark and white themes. Then the question is what are their values?
2) How to use the color retrieved on the previous step to make the stack panel non-transparent? Now I see the main content under it even if I specify the background brush explicitly.
App bar uses a default phone color according to the theme. So, instead of using the app bar color why not use the default theme color? That will also do the same. http://www.jeff.wilcox.name/2012/01/phonethememanager/ this will help you.
For dark theme the color is rgb (31, 31, 31).
For light theme the color is rgb (221,221,221).
Hope this helped.
Cheers
You can get the application bar color from the app resource named "PhoneChromeBrush".
So all you need to do is set the stack panel background to this brush.
<StackPanel x:Name="popupMenuListCommands" Grid.Row="1"
Orientation="Vertical" VerticalAlignment="Bottom"
Background="{StaticResource PhoneChromeBrush}"
Visibility="Collapsed">
<TextBlock Text="menu item 1" Style="{StaticResource PopupMenuListCommand}" />
<TextBlock Text="menu item 2" Style="{StaticResource PopupMenuListCommand}" />
This way you don't have to worry about the phone dark or light theme.

How to remove labels from search page in windows phone?

I want to remove the labels look like that image.
How to remove this. Please help me.......
Thanks in advance.
you can do this by using simple listbox.
just put image and textblock inside your listbox itemtemplete.
here is the code example.
<ListBox x:Name="lst">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Image Margin="10" Source="{Binding image}" Width="60" Height="60"/>
<TextBlock Text="{Binding text}" VerticalAlignment="Center" Margin="20,0"/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
you cant remove jumplist property from app list as it is automatic ... it will show up whenever the count of the items in your applist is more than 40-45 apps and if u remove some apps it will automatically will be gone ... so if you want to remove that jump list view u will have to uninstall some apps.

In WinRT XAML App ListView.CanDragItems enables drag only in one direction when using touch

See the following very basic XAML. I run it in simulator in touch mode. I can drag the item right or left, but cannot down. It does work great when using mouse mode. After some googling I saw this thread (http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/8bb5e423-4517-448b-89ce-179a978e9e2d/), but it did not help me out.
<Page
x:Class="App3.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<ListView Background="AliceBlue"
AllowDrop="True" CanDragItems="True" SelectionMode="None" CanReorderItems="False"
IsItemClickEnabled="False" IsSwipeEnabled="True"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ScrollViewer.VerticalScrollBarVisibility="Disabled"
Margin="10">
<ListView.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ListView.ItemsPanel>
<ListView.ItemTemplate>
<DataTemplate>
<Border Background="Blue" Width="100" Height="100"/>
</DataTemplate>
</ListView.ItemTemplate>
<x:String>s1</x:String>
<x:String>s2</x:String>
<x:String>s3</x:String>
</ListView>
</Grid>
</Page>
This is something so basic and it is strange that it does not work for me.
Does somebody know any solution or workaround?
Thanks
Meir
I might be wrong but AFAIK using touch you can only tear off items perpendicular to the scrolling direction. The same has been mentioned in the forum post you're linking to. If you set IsSwipeEnable=False you disable this behavior as well.
If you want your ListView to scroll horizontally instead, since you've already changed the orientation of ItemsPanelTemplate, you need to add the following to your ListView:
ScrollViewer.HorizontalScrollMode="Enabled"
ScrollViewer.VerticalScrollMode="Disabled"
Now tear off will work vertically instead of horizontally which should be more intuitive given your current layout.