How to Apply Dynamic Themes In Silverlight? - silverlight-4.0

I am creating Silverlight Application. In My Application I want to add Functionality for dynamically change Themes. Like I have two Themes(Blue.xaml, Gray.xaml).
And In My Home Page there are two button which is Blue and Gray. I want to Change Theme based on Button Click.
Can any one help me?
Thnx in Advance.

Silverlight Toolkit has Theming support (use the latest Silverlight 5 Toolkit - December 2011)
use Theme control and set ThemeUri in controls
<toolkit:Theme x:Name="ThemeContainer"
ThemeUri="/System.Windows.Controls.Theming.BubbleCreme;component/Theme.xaml">
<Button>
....
</Button>
</toolkit:Theme>
Ref :http://weblogs.asp.net/lduveau/archive/2010/05/31/dynamically-apply-and-change-theme-with-the-silverlight-toolkit.aspx

Related

Use an Icon Font in Xamarin Forms TabBar

I am just getting started with Xamarin Forms, so please excuse what may well be a rookie question...
I started out with a new Shell Forms App in Visual Studio, so some code was generated for me.
There is an AppShell page which contains a TabBar control. Inside this are Tab controls were I can set my ShellContent pages.
Each Tab has an Icon property, but this apparently only accepts PNG icons.
How can I use an icon font (which is already hooked up to display icons correctly as I am using them in the content of another page) for my Tab icons in Xaml?
I am using Xamarin.Forms 4.0.0.497661
You have to use FontImageSource to do that.
<Tab Title="MyTitle">
<Tab.Icon>
<FontImageSource FontFamily="{StaticResource IconFont}" Glyph="" Size="Small"/>
</Tab.Icon>
...
</Tab>
The solution below worked for me.
Copied the files from fontawesome inside Assets folder
fa-brands-400.ttf
fa-regular-400.ttf
fa-solid-900.ttf
Important the reference "Font Awesome 5 Brands" according to icon needed
<Tab.Icon>
<FontImageSource FontFamily="fa-brands-400.ttf#Font Awesome 5 Brands" Glyph=""/>
</Tab.Icon>
That's a great question. You can't use the tab icon property in a straight forward way to accept the icon font, unless you convert it into a PNG.
If you want to go that route, you can try this, you might have to deal with permissions for saving images. Worth a try!
You can do that with custom renderers as a workaround. Check this example on GitHub here: https://github.com/winstongubantes/Xamarin.Forms/tree/master/CustomIconizeFont

Bootstrap buttons for DataTables

Im In need of assistance when it comes to implementing Bootstrap buttons in a DataTable where the purpose is to toggle the columns with these buttons.
This is how it looks like by default in the DataTables design, what I am trying to do is to use the Bootstrap design instead and also place the buttons to the left of the table which seem rather impossible...
If you have any suggestions please feel free to discuss it!
Check This
Bootstrap 3
This example shows DataTables and the Buttons extension being used with the Bootstrap framework providing the styling. The DataTables / Bootstrap integration provides seamless integration for DataTables to be used in a Bootstrap page.
https://datatables.net/extensions/buttons/examples/styling/bootstrap.html

How do I make the menu collapse to mobile earlier in Bootstrap?

I'd like to be able to manipulate the breakpoint at which the menu collapses to it's mobile version with the 3 stacked horizontal bars.
You can do this by creating your own customized version of Bootstrap. The easiest way to do this is to go to http://getbootstrap.com/customize/ and to set the #grid-float-breakpoint variable.
This will keep the breakpoints for mobile, tablet & desktop at their regular values and only change the point at which the .navbar collapses.
You can customise bootstrap with your own required break points.
Go here and in the ‘Media queries breakpoints’ section and adjust the #screen-sm (mobile), #screen-md & #screen-lg parameters as required ...then generate and then replace your custom bootstrap over the existing bootstrap assets.

Developing Top AppBar for windows 8

I am developing a simple application for windows 8. And now I want to modify the top app bar( i.e it should not look like bottom app bar) and I want it to work much better than only showing the default icons(like navigation job). I want to add my icons of different sizes(length).yes similar to those of weather app or travel app. But I am unable to find any good reference to start with. please help, from where I should start doing it. and whether is it possible to modify the app bar. please guide. note: I am developing app in javascript
Your very basic top appbar can be implemented using the following HTML:
<div data-win-control="WinJS.UI.AppBar" data-win-options="{layout:'custom',placement:'top'}">
<!-- your custom top bar content goes here -->
</div>
From inside the div, you can add anything to your hearts content, even AppBarCommands. Don't forget to initialize all win controls:
<script>
document.addEventListener("DOMContentLoaded", function () {
WinJS.UI.processAll();
}, false);
</script>
Quickstart: adding an app bar with custom content
Read following article, you'll get lot's of good tips
31 Days of Windows 8 | Day #4: New Controls

Edit MainPage title in Silverlight 5

We're going to use Silverlight 5 for an out-of-browser application and need to have an individual title of the main window. In Silverlight 4 it was not possible to set this property as far as I know (See this issue). By default the main window has the title of the project followed by "Application". Does Silverlight 5 bring the ability to change the main window title? Maybe even during runtime via data binding?
In your silverlight project-->Properties->OutOfBrowserSettings.xml you can update the Title.
Please find my sample Settings Page below.
<OutOfBrowserSettings ShortName="My OOB Application" EnableGPUAcceleration="False" ShowInstallMenuItem="True">
<OutOfBrowserSettings.Blurb>This is my first OOB Application in SL 5.0</OutOfBrowserSettings.Blurb>
<OutOfBrowserSettings.WindowSettings>
<WindowSettings Title="My OOB Application" />
</OutOfBrowserSettings.WindowSettings>
<OutOfBrowserSettings.SecuritySettings>
<SecuritySettings ElevatedPermissions="Required" />
</OutOfBrowserSettings.SecuritySettings>
<OutOfBrowserSettings.Icons>
<Icon Size="16,16">Images/XX-16x16px.png</Icon>
<Icon Size="32,32">Images/XX-32x32px.png</Icon>
<Icon Size="48,48">Images/XX-48x48px.png</Icon>
<Icon Size="128,128">Images/XX-128x128px.png</Icon>
</OutOfBrowserSettings.Icons>
</OutOfBrowserSettings>
Here, WindowSettings-->Title will give the Main window title & ShortName will give the Application name in the shortcuts.
Thanks & Regards,
Rousseau Arulsamy
The title of the main window application can be adjusted during runtime only via "Application.Current.MainWindow.Title". This doesn't really comply to the MVVM approach since you can't bind to title property of the main window. This is only possible for child windows, since you create those yourself in your code and have full control over them. The main window is provided by the system and is created during application startup. So you can't bind to the properties during runtime. During initialization the main window is set up with the parameters from the "OutOfBrowserSettings.xml" As I said, it is only possible to adjust the main window parameters "directly" via Application.Current.MainWindow...