It can be done in WPF but the same class doesn't seem to exist in Silverlight

eg. Here is an example

 <Window.Resources>
    <DataTemplate x:Key="FontTemplate">
      <StackPanel Orientation="Horizontal">
                <Border BorderThickness="1" BorderBrush="Black" Margin="10">
                    <TextBlock FontFamily="{Binding Source}"
Text="Sample Text" Margin="5" />
                    </Border>
        <TextBlock Text="{Binding Source}" VerticalAlignment="Center" />
        </StackPanel>
    </DataTemplate>
  </Window.Resources>

  <ListBox x:Name="fonts" ItemTemplate="{StaticResource FontTemplate}" />


 And in code :

fonts.ItemsSource = System.Windows.Media.Fonts.SystemFontFamilies;


On Sat, Nov 1, 2008 at 11:18 PM, Muhammad Niaz <[EMAIL PROTECTED]> wrote:
> Hi can anybody tell me how to get default Fonts  that are available in SL2
> using foreach, mean to populate Combobox or any control dynamically.?
>
>
>
>
>
> Thanks & Regards,
>
> Muhammad Niaz
>
> Software Engineer
>
> Intagleo Systems Pvt Ltd
>
> www.intagleo.co.uk
>
>
>
> -------------------------------------------------------------------
> OzSilverlight.com - to unsubscribe from this list, send a message back to
> the list with 'unsubscribe' as the subject.
> Powered by mailenable.com - List managed by www.readify.net


------------------------------------------------------------------- 
OzSilverlight.com - to unsubscribe from this list, send a message back to the 
list with 'unsubscribe' as the subject.
Powered by mailenable.com - List managed by www.readify.net


Reply via email to