I want to change the background image on Windows Phone 8 app. The following code does not work:
<phone:Panorama.Background>
<ImageBrush ImageSource="/PanoramaAppTest;component/Assets/background.png"/>
</phone:Panorama.Background>
You should try your image source. Like this;
<phone:Panorama.Background>
<ImageBrush ImageSource="/Assets/background.png"/>
or
<phone:Panorama.Background>
<ImageBrush ImageSource="../Assets/background.png"/>
</phone:Panorama.Background>
Actually I don't know but your problem's is location name.
Related
I'm developing a UWP application, however I'm not able to find where are the default icons.
Where can I find a list of them?
you can use character map application and select the font as segoe mdl2 assets. All the available icons will be shown. Alternatively in xaml also you can use like below code:
<SymbolIcon Symbol="Sync" Foreground="Red"/>
So I added an image to the project:
image
How can I make it display in the app? sorry I know this is a stupid question, I am new to app dev. I tried to import a image control from the Visual Studio toolbox and hoped there would be some kind of drag and dop kind of thing. the code for the Image control:
<Image x:Name="image" HorizontalAlignment="Left" Height="174" Margin="69,148,0,0" VerticalAlignment="Top" Width="229"/>
<ListView x:Name="listView" HorizontalAlignment="Left" Height="150" Margin="110,172,0,0" VerticalAlignment="Top" Width="165">
<ListView.Background>
<ImageBrush Stretch="Fill" ImageSource="Mobile Applications\Logo\logo.png"/>
</ListView.Background>
</ListView>
I am using Visual Basics to develop the app.
I have got no idea why you are using a ListView to display an image however in order to display an image using the "Image" tool, you need to set the source via XAML like this
<Image x:Name="image" HorizontalAlignment="Left" Height="183" Margin="154,55,0,0" VerticalAlignment="Top" Width="96" Source="Images\Man.png"/>
Please note, I created a folder called "Images"
Of course there are others ways to add an image without XAML, but this is a good starting point for you I think.
P.S you will need to drag the "Image" Tool to your application, also i tried this using Windows Phone, it maybe different depending on what Framework you are using, but shouldn't be too hard to work out.
Happy Coding!
I am new on windows phone development and I need scroll number picker (as time picker in Alarm app) as shown in image how can i get it.....
View Image Here
If you just need a list of numbers similar to the TimePicker then populate the same primitive controls that the TimePicker uses. In this case you're look at LoopingSelector, you still need to NuGet/Install the windows phone toolkit.
Use
<phone:PhoneApplicationPage
xmlns:toolkit_primitives="clr-namespace:Microsoft.Phone.Controls.Primitives;assembly=Microsoft.Phone.Controls.Toolkit">
<toolkit_primitives:LoopingSelector>
<primitives:LoopingSelector.ItemTemplate>
<DataTemplate>
<!-- design your own square box+text -->
</DataTemplate>
</primitives:LoopingSelector.ItemTemplate>
</toolkit_primitives:LoopingSelector>
For more information:
See TimePickerPage.xaml Source Code
See MSDN Forum on LoopingSelector
OLD Solution
If you're using WP 8.0+ SL then see this SO Post: TimePicker 24h Format. It deals with the Windows Phone Toolkit: TimePicker <toolkit:TimePicker>
Else if you're doing a WP8.1 runtime app just set the ClockIdentifier to 24HourClock.
<TimePicker Header="24HourClock" ClockIdentifier="24HourClock"/>
I would like to use Anonymous Pro font in a Windows RT application. I was trying to follow the steps from this thread, but without any success.
This is my try:
<TextBlock Text="{Binding Title}" HorizontalAlignment="Center" FontSize="56"
FontFamily="/Assets/Fonts/Anonymous Pro.ttf"
/>
Instead of Anonymous Pro the default font is used. Actually, it the sample (see the link) the font family is specified, but I'm not sure: should I do it or should not. If I should, which family should be there?
So how to embed custom font in Windows RT application and use it from there?
here you go.. just appened the font name.. blogged about it when i saw you post
http://invokeit.wordpress.com/2012/10/18/embed-use-custom-font-in-windows-8-store-apps-win8dev-winrt/
Why is this not working :-
<toolkit:Accordion x:Name="___No_Name_" Margin="0" SelectionMode="OneOrMore" HorizontalAlignment="Stretch" VerticalAlignment="Top" Width="{Binding ActualWidth, ElementName=grid}"
>
<toolkit:AccordionItem Header="Welcome" Margin="10,0" IsSelected="True" >
<TextBlock Margin="3" TextWrapping="Wrap" Text="This site was created using FMT. This is a great system that allows anyone This site was created using FMT. This is a great system that allows anyone This site was created using FMT. This is a great system that allows anyone This site was created using FMT. This is a great system that allows anyone " FontFamily="Verdana" FontSize="13.333" Foreground="#FF033C68"/>
</toolkit:AccordionItem>
<toolkit:AccordionItem Header="Family news" Margin="10,0" />
<toolkit:AccordionItem Header="Random photos" Margin="10,0" />
<toolkit:AccordionItem Header="News articles" Margin="10,0" />
</toolkit:Accordion>
I can only see the 1st line. The rest of the content is clipped. Why is the height not automatically setting it up even though i have a wrap on textblock? Why is this control harassing me so much? What wrong am i doing? Why can't i get the normal expected behavior with this control?
Even this simplest possible markup doesn't work.
<UserControl
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"
xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" x:Class="SilverlightApplication3.MainPage"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400">
<Grid x:Name="LayoutRoot" Background="White">
<toolkit:Accordion HorizontalAlignment="Stretch" Margin="0">
<toolkit:AccordionItem Header="Header">
<TextBlock Text="This is a great system that allows anyone This site was created using FMT. This is a great system that allows anyone This site was created using FMT. This is a great system that allows anyone This is a great system that allows anyone This site was created using FMT. This is a great system that allows anyone This site was created using FMT. This is a great system that allows anyone This site was created using FMT. This is a This is a great system that allows anyone This site was created using FMT. This is a great system that allows anyone This site was created using FMT. This is a great system that allows anyone This is a great system that allows anyone This site was created using FMT. This is a great system that allows anyone This site was created using FMT. This is a great system that allows anyone This site was created using FMT. This is a This is a great system that allows anyone This site was created using FMT. This is a great system that allows anyone This site was created using FMT. This is a great system that allows anyone This is a great system that allows anyone This site was created using FMT. This is a great system that allows anyone This site was created using FMT. This is a great system that allows anyone This site was created using FMT. This is a " TextWrapping="Wrap"/>
</toolkit:AccordionItem>
</toolkit:Accordion>
</Grid>
</UserControl>
The text in a TextBlock won't wrap unless the TextBlock also has a Width set.
I took your 'simplest possible markup', added Width=1000 to the TextBlock and the text wrapped as I expected it to.