Add ThumbToolTip to Slider - c#

How to add a ThumbToolTip to a Slider (currently I'm working with Windows Phone 8.1 RT)?
According to MSDN - there is a property that should enable ThumbTooltip. But as I've looked at default style there is no sign of ToolTip.
I've tried to set the value to true (which is also a default value):
<Slider Maximum="100" Value="10" HorizontalAlignment="Stretch"
ThumbToolTipValueConverter="{StaticResource ToolTipConv}" IsThumbToolTipEnabled="True"/>
But no ToolTip was shown. I can think of making a Control and bind it to Slider's value, but can it be done easier way?

The default ThumbToolTip is not available for Windows Phone 8.1.
On Windows 10 UWP apps works fine.

Related

WPF: change style of progressbar

How can I change the style of a progressbar in WPF?
On Windows 10 it's a straight bar, but in win 7 it's splitted in many small blocks. I want to have the bar straight as on win 10, when the application is used on win 7
I just lookng for a property like 'ugly-block-spacing' which I can set. Or do I have really define the whole style new?
Yes, I am afraid you will have to re-define the entire ControlTemplate from scratch. You cannot override only a part of a ControlTemplate:
WPF: Is there a way to override part of a ControlTemplate without redefining the whole style?
But you could copy the default ControlTemplate by right-clicking on a ProgressBar in design mode in Visual Studio on a Windows 10 computer, edit it as per your requirements and then use style i your application instead of the default one.
Progressbar has a property called Style, you could set it to your liking.
If you give Metro a try, you could use somthing like this:
<metro:MetroProgressBar x:Name="pbar" Value="50" Height="20"></metro:MetroProgressBar>
If you want to use the normal bar with Metro Style:
<ProgressBar x:Name="pbar" Value="50" Height="20" Style="{StaticResource MetroProgressBar}"></ProgressBar>
Same without Style:
<ProgressBar x:Name="pbar" Value="60" Height="20" Style="{x:Null}"></ProgressBar>
If you want to know more about Metro, you can find it here

CommandBar is always visible in portrait mode with windows 10 universal app

I don't know if I'm missing something but I doubt it, and to me it looks more like a bug, but I thought I'd check here first just in case.
This is the code I have:
<Page.BottomAppBar>
<CommandBar x:Name="bottomAppBar"
Background="{ThemeResource SystemControlBackgroundAccentBrush}"
Visibility="Collapsed"
IsOpen="False"
ClosedDisplayMode="Compact"
IsSticky="False">
<AppBarButton x:Name="btnSearch" Label="Search"
Icon="Find" Foreground="White" />
</CommandBar>
</Page.BottomAppBar>
When displayed in portrait mode on my phone, it always shows the command bar and when I rotate my phone (landscape), it hides it ok.
Strangely enough the XAML Editor always shows the command bar, no matter what orientation the editor is set to.
This problem occurs on both the emulator and the actual phone.
I haven't tried it via code-behind yet as I'm using MVVM and I'd like to bind a property to the Visibility or the IsOpen properties but will try it later and if required, I will but hopefully, it won't come down to this.
Any ideas?
Thanks.
Thierry
I tested this code in the Windows 10 Mobile emulator build 10586. The command bar is not display in portrait and landscape.

How to show slider tool tip?

Any one knows how to show the slider tool tip on Windows Phone 8.1 WinRT? I have checked the property IsThumbToolTipEnabled but no tool tip is shown. I couldn't find any resources on how to do this on phone. Any clue?
Set a custom template and use the tooltipservice api.
First, edit the style for a slider. Next find the <Thumb> Element. This code will work and show the text, and you can use binding for the text value.
<Thumb>
<ToolTipService.ToolTip>
<TextBlock Text="Your text"/>
</ToolTipService.ToolTip>
</Thumb>

Search Box Control in windows phone 8

Can anybody tell me how do i add search-box control in "XAML" windows phone 8?
i have tried for search-box control but seems that there is no such control exist.No such Namespace exist error shown by compiler..please suggest any answer thank you in advance.
You could use AutoCompleteBox which is a control works like a searchBox
<toolkit:AutoCompleteBox x:Name="txtSearch" ItemsSource="{Binding}" Margin="0,22,3,10" />

Windows phone 8 placeholder issue with Windows Phone Toolkit

I'm developing a windows phone 8 app. I'm new to windows phone 8 development.
I need to add placeholder for text box . I searched in Google & Stack Overflow i got one solution by using The windows phone Toolkit.
I try with following Code.
Step-1: Add Windows Phone Toolkit In Reference By Using Nuget gallery
Step-2: Add namespace in page header
xmlns:xtk="using:WinRTXamlToolkit.Controls"
Step-3: My Textbox XAML code
<TextBox Name="Usernametxt" Text="User Name"></TextBox>
<TextBox Name="Passwordtxt" Text="Password"></TextBox>
<TextBox Name="Emailtxt" Text="Eamail Address"></TextBox>
Step-4: I add the following code under the Usernametxt box [I don't know it's correct or not]
<xtk:WatermarkTextBox WatermarkText="some text" />
I got error in above line The Name WatermarkTextBox does not exist in namespace"using:WinRTXamlToolkit.controls"
I got this solution Here
I don't know how to use this property . I need to add placeholder for 4 to 5 textbox in same page.
Help me to solve this problem.
You are mixing up Windows Phone 8 and Windows 8.
You need a reference to correct toolkit
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
And then you can
<toolkit:PhoneTextBox Hint="some text" Name="Usernametxt" />
Make sure you can got the right Nuget package, more details here.

Categories