I'm trying to figure out why I can't use the glyphicons that are available to WP8 XAML apps in my Silverlight 8.1 Application.
As you can see from the fragment below, I have to specify an image to use as the icon compared to the ease of using one of the glyph icons.
<phone:PhoneApplicationPage.ApplicationBar>
<shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
<shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
Does anyone know how I can simply use the icons without needing to go through the extra work of creating images?
In WP8.1 Silverlight you need to use an image. The symbol enumeration with those glyphicons are only available for Windows (Phone) Store apps only, see the documentation:
Minimum supported Phone: Windows Phone 8.1 [Windows Runtime apps only]
Related
I want rounded images for my WPF application and I'm developing my WPF Application using xamarin.forms not through native code.I am goggling this for the last 2 hours and couldn't find any solution. I've found some solutions that works for android using renders or the solution that works for native wpf code.
And,found a Plugin for circle images but I'm unable to initialize this plugin in my WPF application.
Can anyone please help me with this.
Thank you.
You don't need a plugin or a custom renderer to do that. It's simpler than you might think. Here is how to do it:
<Frame HasShadow="False" WidthRequest="70" HeightRequest="70" CornerRadius="35">
<Image Source="yourImageNameGoesHere" />
</Frame>
It seems that a relatively new class: SvgImageSource can only be used in UWP. Is there any way to use it in a WPF project and how?
Please take a look at this framework:
SharpVectors
The other way is to convert your SVG files to XAML path geometry and using them easily.
It will be possible to use any UWP XAML UI in WPF using XAML Islands. This is currently available as a preview using the WindowsXamlHost control which is part of the Windows Community Toolkit. Also note, that when using UWP controls in WPF apps, the app will then work only on Windows 10 client PCs.
I want to use a font for textbox in my silverlight application for Windows Phone 7. The font isn't contained in the default font list.
Here is xaml code for applying the font to a textbox:
<TextBlock Grid.Row="1" Height="95" HorizontalAlignment="Left" Margin="527,78,0,0" Name="textBox" Text="0" VerticalAlignment="Top" FontSize="72" Width="70" FontFamily="/MyAppNamespace;component/Fonts/Fonts.zip#Papyrus"/>
The font is included in the folder Fonts.
The XAML view window for this page show exact font style that I want. But when I tried to deploy the app to my Samsung Omnia 7 the font used is still Segoe WP (the default font for text box).
So what's the problem here?
You need to include the font in your application. The easiest way to do this is to go into Blend, select your TextBlock element, go to Text properties section, and click the Embed checkbox. Note that if you're using a separate build server, this will require you to have the Blend SDK installed on that system. (For font embedding, Blend uses a custom build target. I believe it's the SDK adds this build target to the target system.)
The reason you're seeing Segoe WP is because your specified font is not found, so the runtime is falling back to a font it knows. You haven't specified any fallback fonts, so it's using the default of Segoe WP.
I made a demo application using Silverlight where I have given certain Unicode of Hindi language to be displayed on a textbox as a text. ऋ ऊ उ ई इ आ, unicode positions are '\u090B', '\u090A', '\u0909', '\u0908', '\u0907','\u0906' respectively.
So when I pass this whole thing as a string to the textbox.text property it shows at the debug time as the exact value is to the textbox but when I go through the emulator the display shows empty boxes.
Is this require installation of different fonts on emulator? If so then how can I do this? Is it possible to build an application for Windows Phone 7 which can support different languages?
You can embed fonts in your WP7 applications in the same way that you embed fonts for any Silverlight application as decribed in the Embedding fonts in Silvelright blog post by Paul Yanez. You simply check the Embed checkbox in the Text pane in Expression Blend.
NOTE: You will need to make sure that you are licensed to use the font in this way or that it is free for use in this way.
Is that possible to use themes from Silverlight Toolkit in Windows Phone 7 applications?
Or they are only for desktop/web applications and not included in toolkit for WP7?
Is there any tricks that could let me use them in my app?
Theming support is not built into the toolkit for WP7.
The controls in the Phone version of the Toolkit support the configurable themes on the phone. (i.e. Dark/light themes and accent colours.)
If you wanted to do this and had re-templated all the other controls you were using, it shouldn't be that much more work to apply your custom styles to the toolkit controls too.
Windows Phone 7 has adopted a style of theming refered to as Metro. You can get some background on this if you watch CL14 from Mix10.
The resources you can use are covered here.
Theme Resources for Windows Phone
You aren't obliged to follow this theming however and can integrate other styles if you choose to.
Ok,
I figure it out by myself.
All you need to do to use original Silverlight Toolkit themes is to
Get its sources
Take out themes xaml files from them
Place this needed theme as a style for desired control in your WP7 app resouces
Apply new style to desired control.