wasting 4th hour behind textblock wrap in accordion - silverlight-4.0

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.

Related

XAML & AXML Xamarin

i'm totaly newbie with xamarin. Iknow whats is XAML file, and AXML . But i don't understood on this project ( New/ Cross plat. / Android )
The files XAML or AXML.
I have : APP.XAML and MainPage.XAML but also in layout Tabbar.axml and toolbar.axml
Running the app, the main page displays the label
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:App1"
x:Class="App1.MainPage">
**<Label Text="APP TEST HUB" **
VerticalOptions="Center"
HorizontalOptions="Center" />
But i can't acess the toolbox to designer. Openning the layout Tabbar.axml and toolbar.axml files i can acess the toolbox and work in design, but running the app this files isn't appears.
Can anyone tell me the difference of the files and his importance to the project . Where i'll work my design ?
XAML files are used by Xamarin Forms projects. AXML files are used by Xamarin Android (and native Android) projects.
You appear to have created a Xamarin Forms project. Typically you would do this if you wanted to create an app that ran on multiple platforms (iOS, Android, etc). In Xamarin Forms projects, the platform project (Android in your case) is primarily used to bootstrap the Forms code that lives in the shared project. Most of the UI actually is defined in the shared project via XAML files.
In addition to Jason's answer, XAML uses the basic native UI of what to be shown to each platform, if you wanted to have an extensive/heavy UI, you have to use a CustomRenderer in order for it to be applied in your XAML code.
why xamrin layout use axml file but xamarin form user xaml?
AXML and XAML are two different XML specs.
AXML is used to define native ui in Xamarin.Android based on XML spec:
xml.com/axml/axml.html
AXML Is just supported/available for Xamarin.Android.
XAML is the way Xamarin Forms could standardize Cross Platform UI
based on XML spec
https://msdn.microsoft.com/en-us/library/cc295302.aspx
If you are using native Xamarin Android you will do UI using axml if
using Forms then using XAML.

Where find default Windows 10 UWP icons

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"/>

AdControl not show ads

in my application I have the following code:
<UI:AdControl x:Name="ban2" Grid.Row="1" ApplicationId="xx"
AdUnitId="xx"
HorizontalAlignment="Center"
Height="80"
VerticalAlignment="Center"
Width="480"></UI:AdControl>
When using the test aplicationid and adunitId working properly, but when I go to replace with aplicationid and adunitId of my application created in the dev center no longer displays advertising.
thank you
If you don't publish your app in the store, the Application Id and Adunit Id will do not work.
So I would like to suggest you use test Application Id and AdUnit Id to test when you create your project. if you want to package your project and submit in the store, you just need to replace test value with real value(Apply for in the dashboard).
Normally, if your app is published and available in the store, it takes 1-2 days after that for ads from real units to start serving and ads will show.

How to display uploaded image to App-Visual Studios 2015

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!

Use embedded font in Windows Store App

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/