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.
Related
I 'm developping a windows phone 8.1 application and I would like to make a view with the panorama control but Its impossible to find the control
I have the Pivot control but not the panorama, is the panorama control is available on windows phone 8.1 ?
I have find nothing on it on the Internet so far :/
Thanks for the help :)
The Panorama control has been renamed Hub because it’s now available on both Windows Phone and on Windows. So, you would do something like:
<Hub Header="My header">
<HubSection Header="My sub header">
<DataTemplate>
<Grid />
</DataTemplate>
</HubSection>
<HubSection Header="My sub header 2">
<DataTemplate>
<Grid />
</DataTemplate>
</HubSection>
There are some changes in the API, as you will use HubSection instead of a PanoramaItem, and you must have a DataTemplate inside a HubSection, so be sure to check the following reference:
https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.hub.aspx
There are some nuances as a slightly different and odd behaviour when you have only 2 HubSections, as noted here: Windows Phone 8.1 app with 2 hub sections, but that may or may not be an issue for you. Some guidelines and implementation examples can be found here:
https://msdn.microsoft.com/en-us/library/windows/apps/dn449149.aspx
A friend and I have tried to get the video player on Windows Phone 8.1 to play a m3u8 stream, but we've been unavailable to succeed.
What we've tried:
We've tried with playerframework.codeplex.com (Microsoft Player Framework), but it was unable to load the file.
We also tried with Windows Phone Streaming Media (https://phonesm.codeplex.com/), but we were unable to as much as use this one as we couldn't make sense of their documentation on how we actually had to load the file?
Is there anybody who have worked with this kind of files before? I understand that m3u8 is not natively supported by Windows Phone 8.1
Download the player framework, consume the following DLL's:
Add the player to your xaml:
xmlns:mmppf="using:Microsoft.PlayerFramework"
xmlns:smmedia="using:SM.Media.MediaPlayer"
<mmppf:MediaPlayer IsFullScreenVisible="True" IsFullScreenEnabled="True" IsFullScreen="False" CurrentStateChanged="mPlayer_CurrentStateChanged" x:Name="mPlayer" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsFastForwardEnabled="False" IsInfoEnabled="False" IsLive="True" IsMoreEnabled="False" IsRewindEnabled="False" IsRightTapEnabled="False" IsScrubbingEnabled="False" IsSeekEnabled="False" IsSkipBackEnabled="False" IsSkipAheadEnabled="False" IsReplayEnabled="False" IsTimelineVisible="False" IsTimeElapsedVisible="False" IsTimeRemainingVisible="False" RequestedTheme="Dark">
<mmppf:MediaPlayer.Plugins>
<smmedia:StreamingMediaPlugin />
</mmppf:MediaPlayer.Plugins>
</mmppf:MediaPlayer>
Then set your stream VIA code - or XAML if the URL never changes.
#Mahesh Vemuri asked what if he has error that says StreamingMediaPlugin is not available or not found in namespace, here is my work around:
XAML:
xmlns:PlayerFramework="using:Microsoft.PlayerFramework"
<PlayerFramework:MediaPlayer Name="player"
Source="http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8"
AudioCategory="BackgroundCapableMedia"
IsAudioSelectionVisible="True">
<PlayerFramework:MediaPlayer.Plugins>
</PlayerFramework:MediaPlayer.Plugins>
</PlayerFramework:MediaPlayer>
And in your .xaml.cs file you simply do this:
SM.Media.MediaPlayer.StreamingMediaPlugin asd = new SM.Media.MediaPlayer.StreamingMediaPlugin();
player.Plugins.Add(asd);
player.Source = new Uri("address-to-m3u8");
It worked for me since "default" way didn't. Hope it helps someone else, too.
you can add them from xaml or cs. First add reference.
XAML
xmlns:local="clr-namespace:Microsoft.PlayerFramework;assembly=Microsoft.PlayerFramework"
xmlns:smmedia="clr-namespace:SM.Media.MediaPlayer;assembly=SM.Media.MediaPlayer.WP8"
<local:MediaPlayer Name="player"
HorizontalContentAlignment="Stretch"
AutoPlay="True"
Volume="0.7"
Source="http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8"
IsPlayPauseVisible="True">
<local:MediaPlayer.Plugins>
<smmedia:StreamingMediaPlugin />
</local:MediaPlayer.Plugins>
</local:MediaPlayer>
XAML & CS
xmlns:local="clr-namespace:Microsoft.PlayerFramework;assembly=Microsoft.PlayerFramework"
<local:MediaPlayer Name="player"
HorizontalContentAlignment="Stretch"
AutoPlay="True"
Volume="0.7"
IsPlayPauseVisible="True">
</local:MediaPlayer>
SM.Media.MediaPlayer.StreamingMediaPlugin asd = new SM.Media.MediaPlayer.StreamingMediaPlugin();
player.Plugins.Add(asd);
player.Source = new Uri("http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8");
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" />
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.
I am workng on windows 8 app getting problem to use text watermark to text box, can anybody help me to find out how we can apply water mark init .
below is the code of my text box.
<TextBox x:Name="txtUserName" Width="351" Height="45" BorderBrush="Gray" BorderThickness="2" Background="{x:Null}"/>
Use
<TextBox Width="250" Name="_txtBox" PlaceholderText="Please enter CS#"/>
you can use Callisto toolkit for windows 8 it has watermark textbox control. you can install it from nuget package manager.
use this namespace in your page..
xmlns:CallistoControls="using:Callisto.Controls"
use the control like this.
<CallistoControls:WatermarkTextBox Watermark="Type to message" HorizontalAlignment="Stretch" TextWrapping="Wrap" AcceptsReturn="True" MaxHeight="100" Padding="5,5,20,30" />
there are other useful controls too. hope this helps you
There's no way to do it without using a third-party library or overriding the text box and creating your own "Watermark Text Box" class. You just listen for the got/lost focus events and display your text appropriately.
If you don't want to rely on 3rd party SDKs, you can create your own. Check out these tutorials.
Create Your First WinRT WatermarkTextBox Control
Watermark TextBox in Windows Store apps
WaterMarkTextbox Control in Windows Store Application Using XAML