DeepZoom for WPF add items to map - wpf

I'm trying to figure out how I can place UIElements (Buttons, Rectangles) on a floorplan which is hosted in a zoomableCanvas as a MultiScaleImage.
The placed UIElements will change their backcolor and other properties dynamically.
Does anyone has an idea how to achieve this?
best regards

Related

Choose Correct Control (TabControl,ListView,ListBox,Button) - WPF Custom Style

I want to create a theme like Apple Ipad in WPF,
if you know any , please let me know.
else, please help, to choose correct control for these Pictures in WPF (TabControl,ListView,ListBox,Button).
Thank you.
as for the top picture, it makes sense to use a TabControl where you need to:
change the template/style of the TabControl to center the TabItem headers. you can change the panel to just a StackPanel with Horizontal orientation or a custom panel.
as for the TabItem controls, you make the round corners of the first and last items by setting the attached properties IsFirst, IsLast (you need to create them).
the attached properties can be set either automatically by the custom panel, or manually via xaml.
Regards

Customize my ScrollViewer/Scrollbar in xaml/wpf

I am really bad when it comes to styling in XAML and I have a really big problem. I want to customize my scrollviewer in the ListBox that I have. I want to look something as simple as this
I hope that someone can help me do this.
Thanks in advance.
If you're using Expression Blend this is pretty simple actually. First you need to get to your Control Template for your ScrollBar. You can do this by dropping a ScrollBar control on your Design Surface then right-click and choose "Edit Template -> Edit A Copy" which will present a box to enter the name of your new Style Template and whether you want to save it to a Resource Dictionary or to the file you're working in.
Once you have saved it you should see multiple Parts in your Objects & Timeline panel for the Vertical & Horizontal templates of your ScrollBar. You will be editing the properties of the Rectangles & Borders that create the visual of your Scrollbar within each Control Template for Horizontal & Vertical depending on which you choose to use.
To re-create your example should be relatively easy with finding the "VerticalThumbTemplate" or "HorizontalThumbTemplate" and editing the Border / Rectangles within them to get your oval as you display. You might also want to tinker with your VisualStateManager States while you're in there for MouseOver effects etc.
An example of a custom scrollbar can be found in a partial theme I created awhile back you can view here.
Once you have created your custom ScrollBars you can either make your new style template the default by changing the BasedOn Value for that TargetType, or applying it directly to the ScrollViewer built in to your ListView Template.
Hopefully this should be enough to get you started in the right direction. Cheers! :)
Scrollbar is one of the harder template to customize. If your are really bad at that, you maybe have to search at a custom controls librarie.
But if you really want to edit the scrollbar template, there is plenty of sites that will help you with a simple google search

Making a custom(/templated) ScrollViewer or ListBox that understands which item to bring to view

I am trying to make a panorama-like control in WPF c# that scrolls to/brings into view only one grid from a horizontal set of grids. I need to expose the command which allows me to scroll forward/backward from various controls (which using an InteractionTrigger would suffice) on any of the grids in the ScrollViewer or ListBox.
I want each of the internal grids to size to the actual height/width of the usercontrol they live in (like tiled pages), won't need any scrollbars, and will eventually be applying easing effects/states to each of the scroll positions.
If this is too vague/convoluted, please let me know.
Thanks in advance! :)
Easy Solution:
PathListBox. Downloaded the PathListBox toolkit (for the PathListBoxScrollBehavior), set the capacity to 1, and used the templated InteractionTriggers to bind various source objects on my grids to the InvokeCommandAction Increment/Decrement Commands. Then I added easing effects/GoToStateActions.
I realize this is sort of a cheat, but am still going to search for the "real" way to do this with custom control templates deriving from ListBox and/or ScrollViewer.

WPF - Adding ScatterViewItem.Content to a StackPanel as UIElement

I'm attempting to make a application where you can drag ScatterViewItems next to each other, and the items will dock together, so that you can move them around as a single item.
Right now I'm trying to create a StackPanel and add the content of the two ScatterViewItems being docked to it, but am not sure how to convert the SVI's content property to a UIElement in any meaningful way. Has anyone tried to do something similar, or have any ideas on how to get it to work?
Look at the ScatterPuzzle example in the Surface SDK. It shows precisely how to accomplish this scenario of snapping items together

WPF page layout control selection

I have an imagebrush of a soccer field as the page background and I want to be able create a line up by dragging players off the bench and positioning them on the field accordingly. I don't know what control to use for the background that allows the PlayerCard control to reside where it is dragged. Any help as to how to begin would be appreciated.
You can get the idea here.
What control to use?
I believe you want the Canvas container control. It lets you arbitrarily place child controls with a Left and Top attached property, similar to the way Windows Forms does it.

Resources