I want to define 2 styles, 1 for high end and 1 for low end. On initial app run, system determines which one to use.
I'm thinking how to implement this. I read about DynamicResource but also know about performance considerations using it (since I'm also targeting low end devices). This is a main style used by buttons through the app.
Is it possible to use Binding of the style? Something like Bind a static variable?
What would be the best approach for this?
Thank you!
You might want to look into TemplateSelector, it might help:
Here's an example...
http://www.jerriepelser.com/blog/3-ways-dynamic-data-templates
Related
I am trying decide which tool works best for my organization. For that reason I am testing performance of powerbi, looker and tableau against bigQuery etc. Since this is a benchmarking exercise and I am planning to test it for multiple iterations, I want to disable the result set caching property of big Query. In the official documentation, they are letting us disable by passing query config use_query_cache=False
Since I am connecting from front end tools, I am not really sure how to pass this parameter. Can someone help in achieving this? or alternative options if available?
I've not tried this, but I'd think it could be passed like other options.
In this documentation, they have code that looks like this:
Source = GoogleBigQuery.Database(
[BillingProject="Include-Billing-Project-Id-Here", UseStorageApi=false])
I'd expect your parameter to look similar. I.e.
Source = GoogleBigQuery.Database(
[BillingProject="Include-Billing-Project-Id-Here", UseQueryCache=false])
I am trying to code a medium sized full web application based off dojo.
I have a basic BorderContainer that is placed at the document.body.
In order to make code maintainable and easy to read, I want to put fully contained widgets/modules in each of the sections. That can be simply added by a couple lines such as...
var topTabs = new TopTabs();
top.addChild(topTabs);
And then I want to stitch them all together so that they can invoke work in each of the other widgets, in order to follow the MVC model.
So for instance, one example that I would like to insert the following widget that is fully contained into the top section that looks something like...
So my question is....
What is the best way to create these fully defined and encapsulated widgets/modules?
Since my widgets will also contain other Dijits, then are template based widgets the route to go? Or is it better to create widgets/modules that are purely programmatically defined?
Thanks
Depends how much you are familiar / comfortable with declarative/html (templated) versus programmatic/javascript. You can definitely go both routes;
I seldom use templates, which are static by nature and mean two set of entities in two languages, usually two files, to account for. Besides, with dojo/dom-construct & dojo/dom-style, I have an effective dynamic replacement to html templates, allowing to build self-contained complex widgets
jc
Your going to want to read about making custom dijits (widgets) - https://dojotoolkit.org/documentation/tutorials/1.9/recipes/custom_widget/
templates vs programmatic is more of a personal choice. templates are much easier for a UX (non dev) to work with. i like to use templates as it reduces the clutter in my js files i prefer to keep things separate logic (js), style (css), and structure/layout (html).
Just thinking and a question round my mind. I use to code xaml using grid, easier for me, at least. Just define the grid and using its cells (span row and column and so on...).
Doing a web´s demo today I remember table´s tag is being obsolote and I am wondering, the same idea could be applied to grid in mobile´s app.
Thinking about it, absolute and relative layout are similar to div (web speaking) so we could deduce the right way to render the xaml should be using those kind of layouts...
What do you think guys? What advantages and deficiencies are coming on using those approaches? I want to get use to code thinking in the best way, not thinking about easyness of that (supposing, that benefit me in long terms. Maintainability, flexibility,...).
As usual, thanks for your help mates.
Well, the point is the next one. As web design do, using layout (relative and absolute) like div could be more complex at the beggining, but after the project is growing up, the benefits of using these approaches take relevance with the time.
If you need to change the style of the view, these layout are more flexible for doing it, just set the limits of the each element and you can add another element as well in a easy way.
But if you decided to use grid layout approach, and after, you need to change the style, the operation will be more complicated because you probably need to reset the definition of column and row for adding new elements and this implicate to recode every row and column for the other rows as well.
Hoping it helps when you are in design phase and you need to calculate risk and maintainability of your app.
Cheers mates...
I want to make a vertical line going through the middle of the site and then have content on either side. How can I use CSS or ruby? to do this? I am not sure which one I would need and where I would put it. Also, what is the best resource for learning the syntax of the ruby on rails views/CSS stuff. It seems that rubyonrails.org doesn't have much documentation on that (they mostly explain the models and controllers)
I would suggest you start with something like: https://github.com/softmachine/rails-bootstrap
They provide a link to http://twitter.github.com/bootstrap/ which has plenty of documentation.
The next step, would be to ask a more specific question related to the exact problem you're having.
From your description it sounds like you need css, and depending on the nature of of the information you want to display, you might need to use ruby/rails to make it happen. Most likely, you could just use css.
see: http://jsfiddle.net/aTUq8/
Maybe I have missed something obvious. Currently I am using the feedback interrupt to change the cursor to one of the Windows supplied cursors (thanks to being put on the right track by Hans Passant in answer to a previous request for help - thanks).
Instead of using the pre-packaged cursors, is it possible to use my own custom-cursor (icon), and if so - are there any rules re size etc., or can I use something like a png/jpg etc.. ?
Regards,
Oliver
Yes, no problem. But it has to be a cursor, it can't be an image.
You can turn an image into an icon with Bitmap.GetHicon() method and pass that to the Cursor class constructor. It does however a very poor job on images that contain a lot of colors. The color mapping algorithm is miserable, in general that's something that's hard to do well. It is best to use a good graphics program. Check my answer here for a trick to use text as a cursor, using the same technique.