UWP - Secondary tile sizes - windows-10

I'm working on a new W10 UWP app, and ran into a small issue.
I'm generating tiles with a separate Tile service - it creates secondary tiles, and updates them when required (and also updates the primary tile).
However, for some reason, even though the Wide and Medium templates are used, the sizes the tile offers when right-clicked are just "Small", and "Medium".
I found no reference on how to enable Wide and Large tile options. Does anyone know?

Okay, so the solution is simple...
It's not enough to add the Live Tile templates, you have to manually specify the sizes by adding the proper graphics Uris to the SecondaryTile instance. So if you want a wide tile to be available, assign a value to
tile.VisualElements.Wide310x150Logo
and so on, before calling
await tile.RequestCreateAsync()

Related

Godot images scaling differently

As I started developing a system to place down things such as workbenches for my game, the images of these items started to exceeded the usual 48x48. I centre them inside a panel node(64x64), that also acts as a inventory slot. I created a margin container and turned on the expand property of the texture rect node so these images always fill the panel. The weird part starts here, these images that are bigger than 48x48 are scaling slightly different for every slot I place them. Is there a way to stop this and make them at least look the same?
Enable "Use Gpu Pixel Snap". You will find it in Project Settings under Rendering -> 2D -> Snapping. It is off by default.

Render objects based on zoom level in Azure indoor maps

Is there a way to show/hide objects on a map based on the zoom level in azure indoor maps module? Honestly, I'm not so sure if this feature even exist yet
Custom styling of indoor maps in Azure Maps is a planned feature.
Note that indoor maps leverage vector tiles for rendering and items that don't appear when zoomed out, are not loaded in the map, so you won't be able to show things that aren't there at this time. There will likely be some configuration for this in the future. Things that do appear today could potentially be hidden although in a bit of a hacky way since this custom styling of indoor maps isn't officially supported yet.
For example, using the building from the indoor maps tutorial, the following sets the zoom level range of the room number labels to 0 - 22.
map.map.setLayerZoomRange("indoor_global_unit_label", 0, 22)
The first value in that function is the id of the rendering layer which I retrieved by running the following code in the console, then moving the mouse over the item I wanted to get the id for:
map.events.add('mousemove', function (e) { console.log(e.shapes[0].layer.id ) })
The second and third parameter of the setLayerZoomRange method is the min and max zoom levels. When that line of code is ran, you will notice the labels appear when zoomed out much longer than usual, however, if you zoom out enough, they disappear since they become no longer available in the vector tiles.

Make windows app fit to screen size instead of static size

I'm working on a windows app in order to learn how to make them in general, and one issue I'm continuously having is the fact that when I go test it, the controls only take up a portion of the screen because they are sized to fit a smaller screen. How can I make them fit for all screens? If I need to provide screenshots to illustrate this point I can.. using forms this was accomplished via docking, but the apps don't seem to have that same capability.
I assume that by "windows app" you mean a Windows Runtime app, probably in Xaml.
You can get dock-like behavior by using the VerticalAlignment and HorizontalAlignment properties on your FrameworkElement (including Controls). This allows forcing the control to the left, right, top, bottom, or stretching to fill the area it is in.
Combine this with flexible layout controls such as Grids. A top level Grid will fill the screen and can contain rows and columns with relative sizes. This allows the page layout to shrink or grow to cover a fairly wide range of sizes with a single layout.
For larger changes (such as switching between portrait and landscape aspect ratios, or to support a skinny snapped window) you can use VisualStates to either move the controls or to switch between different sets of controls. If the controls are data bound then either set will work automatically with the underlying data.
MSDN has some good documentation on these concepts at Guidelines for supporting multiple screen sizes and Quickstart: Designing apps for different window sizes

Adding multiple Overlays on map view takes more time

I'm trying to add multiple overlays of about 1500 on map view. I'm getting the locations from database and adding them on map view. The time to get data from database is very low but the time it takes to draw them on map is very high which is about 30 sec and I want to add overlays based on zoom levels, like level<4 1000 overlays, >=4 2000 overlays, redrawing these overlays screwed me. Please show me the solution to add them in a less amount of time.
I've had another problem with multiple overlays, it is causing memory issues on an actual device (Not the sim). The solution to this was creating one overlay from all. This might also be the solution to your problem as drawing the "combined-overlay" should be a lot faster:
The credits go to this answer and the code provided on the Apple Dev-forum
You then should be able to create one overlay from all and then draw that one overlay on the map.
Basically you create a class that handles the multiple overlays and draws them together onto on OverlayView

How does Nike's website do this Flash effect when the user selects a choice

I was wondering how does Nike website make the change you can see when selecting a color or a sole. At first I thought they were only using images and when the user picked a color you just replaced that part, but when I selected a different sole I noticed it didn't changed like an image it looked a bit more as if it was being rendered. Does anybody happens to know how this is made? Or where can I get further info about making this effect :)?
It's hard to know for sure, but my guess would be that they're using a rendering service similar to that provided by Adobe's Scene7.
It's a product that is used to colorize/customize a base product image based on user choices.
If you're interested in using the service, I'd suggest signing up for their weekly webinar. I attended one a while back and was very impressed with their offering. They showed the Converse site (which had functionality almost identical functionality to the Nike site) as a demo.
A lot of these tools are built out in Flash using a variety of techniques:
1) You can use Flash's BitmapData object to directly shift the hues of the pixels in your item. This is probably the simplest technique but often limits you to simple color transformations.
2) You can pre-render transparent PNG's (or photos, I guess) containing the various textures you would want to show on your object (for instance patterns or textures) and have them dynamically added to your stage at runtime. This, I think, offers the highest fidelity but means you need all of your items rendered upfront.
3) You can create 3D collada files and load them via a library like Papervision3D. Then dynamically change the texture at runtime. This is the most memory intensive technique and tends to result in far worse fidelity, but for that you get a full 3D object that you can view in space.
I'm sure there are other techniques but those are the top 3 I can think of. I hope that helps!

Resources