I'm just trying to figure out the ToggleSwitch font that comes with the WPtoolkit, so that I may apply a similar style to other items in my app. How may I determine this?
WPToolkit uses the default Windows Phone resources for fonts/colours.
For the exact styles you can look at the Generic.xaml theme in the WPTookit source
In this case it's using PhoneFontFamilyNormal, FontFamily="{StaticResource PhoneFontFamilyNormal}"
For a full list of Resources for WP take a look here
Related
Given that Slate documents by default do not appear when calling window.print() (or using the print/save as pdf option in chrome), and also that the optimal styling may differ when printed than when displayed in a web page, what are some good ways to create a "print version" of a Slate dashboard?
I'm also thinking of things like hiding sliders and search fields, adding classification watermarks, adjusting logo placement etc.
Slate is optimized for rapid application development. The underlying framework imposes few limitations on the configurability of layout our styling. As a result, Slate is unable to generically render all applications in a manner suitable for print media or export. Application developers will need to invest time on an app-by-app basis to support printing.
The first, best option is to consider why there is a requirement or request to print your app. Do your users simply need a way to preserve the view they've created and reference it later or use it during a presentation? In this case, consider using (or highlighting to your users to use) the built-in Get Shareable Link functionality. In View mode it's under the Action menu - in edit mode, you can use the Slate.saveView action and the Slate.viewSaved event to create these programmatically, then the Slate.loadView action to load a previously saved view.
This will create a unique url with an id that will, whenever the link is loaded, return all the page widgets to the state they were in when the link was generated. This means, for example, a set of input widgets will default to the inputs configured by the user and feed into the queries, etc.
In combination with the per-user storage cache, this makes it possible to build workflows to save a list of preview "views" for a given user and reload them in the future.
If you really must print or export, then you'll need to define additional media CSS styles to help your application render appropriately.
To start, you'll need to add at least this to the Global Styles:
#media print {
#page {
size: A4;
}
html, body {
height: 600mm !important;
}
}
You can read more about media CSS for printing in various articles like this or this.
Printing “responsive” applications or any application with complex styling or layout will be very difficult. In these cases, consider creating a “Print View” as a separate application that receives necessary inputs via URL parameters and generates a simplified view optimized for printing. This will increase the development cost and maintenance burden, but will result in satisfactory behavior.
If after applying the above Global Styles, the printout is still getting cut off, try using the "Print using system dialog" option in Chrome, which (at least on a Mac) will give the option to specify a Scale (screenshot). By scaling down from 100% you should be able to get the full Slate view to fit on the page.
My application does not have multiple documents. So I do not need the tab shown in LayoutDocumentPane. I found that it can be customized by using style here. http://avalondock.codeplex.com/wikipage?title=Document%20tab%20restyling
But it seems to be over complicated. Is there any simple way of doing this ?
If you don't need multiple documents, you probably don't need documents at all. You should put your content in a normal dockable panel.
In AvalonDock 2.x you could use LayoutAnchorable and in 1.x use DockableContent, both nested in suitable containers of course.
In avalondock 1.x there is a property that does just what you need. Its called DocumentPane.ShowHeader.
It does not (yet?) exist on 2.x
If you want to modify avalondock to do what you need, I submitted a patch to the project that adds the feature.
Its included in this ticket: http://avalondock.codeplex.com/workitem/15626
#myThemeBackground = #ddd;
div#box1 { background: #myThemeBackground; }
I'm using LESS in order to use variables for my css. It works fine, but I'm wondering if there's a way for me to change the "myThemeBackground" dynamically at runtime via javascript or something.
So say if the user chooses a custom color for the background I'd like the entire skin to change.
Note: this is for dynamically theming/skinning an application where the user chooses the color for the background for example and then the whole app changes (without a page refresh)
You can modify Less variables on the fly using the modifyVars method:
less.modifyVars({ myThemeBackground : '#000' });
I usually grab the CSS generated by LESS and include that in a file to optimize the web page loading speed. In fact, I use LESS.app for Mac to generate my CSS.
To my knowledge, part of the solution would involve including less.js file to your page. This in turn means that generating the style of the page would be slow and the caching might cause you some trouble too...
I would humbly suggest generating multiple CSS stylesheets with LESS and include these files when needed with JavaScript.
The only solution I can think of is to change the text you render with less.js, with:
less.refreshStyles()
Change the text in the file or in the less snippet of styling.
Read more about it here:
Load less.js rules dynamically
I'm using a fully licensed version of Idea.
I just created a custom file type for *.jade files. Generally, I use a 4-space tab-size, but for *.jade files, I want to use a 2-space size.
That's it. I don't want a work around. I want to be able to set a specific tab size for only *.jade files.
http://www.jetbrains.com/idea/features/code_style.html
says: "...tab and indent size can be specified per file type."
It's not possible to specify indent settings separately for custom file types right now. Such functionality is provided by the language specific plug-ins (even some language plug-ins do not allow to set custom indents and use settings from the General tab).
There is already a feature request submitted 7 years ago and with zero votes. Feel free to vote.
UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
What font gets used? If I have an app, which is using the windowslookandfeel, is there a way to change the font used on a local system, by changing the default font for this L&F - I am looking at changing Windows options - such as Control Panel/Registry/System Properties etc..
Thanks
Multiple default fonts are used in the Windows L&F. The most used one is Font.DIALOG, but it also uses Font.SANS_SERIF, and Font.MONOSPACED. Changing the default is done via the class UIDefaults (JavaDoc).