WPF UI Related question - wpf

realy i don't know what i should title this problem, i hope to "WPF UI Related question" is accept able.
consider something like that form who you explore a class diagram in Visual Studio.
you select any class object in window and than right click on it then you select "Properties" menu Item and then a window will pups up that allow you to change selected class object.
or something like Auto Cad. when you draw a line you can right click on it and then select Properties menu item and then with appeared window you can change line's properties (like color of line or any thing like that).
now i want to create an application with an User Interface like these who mentioned on upper lines.
i want to create an UI that i cad draw circle and squares on it (with mouse clicks) and then when i want a "Properties" window will appeared to change objects's properties.
also with this capability that wheeling mouse wheel up-down will results in zoom in/out the screen (like Auto CAD).
finally my question is that is there any kind of frameworks or pre created controls that i can use them for achiving these goals or i have to implement all these my self?
thanks all and sorry for my bad english..

You can use this for your property grid:
WPF Property Grid

for giving zoom capability i use this and for property windows i use this.
thanks to Yogesh...

Related

WPF Tab item sliding on mouse hover

I want the tab item to be displayed by sliding effect as given in VS 2010, eg. when we point docked objects like toolbox, solution explorer, properties it is shown immediately. In that way i want my tabcontrol to display items by sliding effect. is it possible? Please Help...
you can achieve similar things by making use of AvalonDock, its opensource.

wpf user control to display on top of current view

I wish to have a user control in my application. The behavior should be similar to a tooltip. That means, when I move the mouse inside my view, this user control also moves.
How to achieve this.
I do not wish to have draggable canvas, just that the top and left of the control change. Actually what i wish to achieve is quite similar to a magnifier. But instead of displaying a digital zoom image I wish to display a cropped image inside the magnify viewer.
You can also use the Adorner class. Hope this solves your problem.
Adorner Class Description (MSDN)

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

C# - How does the ToolTip work?

I was wondering how I am able to add one ToolTip control to the Form, and all the buttons get different texts? How does one object extends all the others, adding diferent things on each one? I don't know if I am being clear, If I don't, please let me know!
Thanks in advance!
I think you are looking for Extender Providers, where you can define new properties for other components.
This is a feature of Visual Studio designer. The ToolTip control does not actually add a property to other controls, but Visual Studio knows that when you have a ToolTip (or any other component that is an Extender Provider), it should add some other properties to property grid of the other controls. All this information is queried from the component that provides those properties (ToolTip). When you set the tooltip for button for example, Visual Studio calls the SetToolTip method of the ToolTip control, to inform it of the new value for the control.
Please refer to provided links for more information.
It's actually very simple.
Lets say you have a windows form with two controls a button and a label.
Now add a tool tip from toolbox to your form named tooltip1.
Now right click on button and go to properties, scroll down until you find tooltip on tooltip1. set the text to whatever you want. Now do the same for label.
Run the program and move the cursor over both the controls. you'll see respective tool tips.

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