Images without borders in PropertyGrid control - winforms

Using windows forms PropertyGrid control I can add images into select for any property using some UI type converters, etc. This control adds black border for each picture in the list. Does anybody know how to remove it?
See the samples of desired and existing picture here
and

Use the following line of code in your custom UITypeEditor class before drawing the image:
e.Graphics.ExcludeClip(e.Bounds);

Related

WPF layout Control issue

I have wpf project which print label as per editor. Project has 17 different editors. This is small little drawing for my current application for current label editor.
It has several small controls like, Tool Box, Dimension Slider, Ruler, Canvas navigation bar, Label Definition bar etc... It has one more control called Label Editor, this control will vary as per different editors (17), other controls will stay as it is.
No I want to make some generic control which contains all controls except Label Editor, so each time when I create new editor I don't need to re-create all controls each time. I can use what I have for all 17.
What control should I take to do that, content control, control template, data template or user control for that. Here is small drawing what I have.
Pls share your suggestions.
Thanks
Dee
You could try loading the label editor through a Frame and create a page for each label editor.
Alternatively, you could create a custom control with a LabelEditor property that takes an object. This approach would be more difficult, though.

AutoCompleteBox Dropdown width

Can the width of the dropdown be set to a different value than the AutoCompleteBox itself?
The Popup is a separate Part of the AutoCompleteBox, so it should be possible to extend that beyond the width of the text box.
In Blend, right-click on the AutoCompleteBox and select Edit Template > Edit a Copy, giving the new template a name.
Drill-down in the Objects and Timeline window to the 'Popup' part, and beneath that is a Grid. Change the width of that Grid to change the width of the popup content whilst maintaining the current width of the text box).
(I must admit I've only had chance to do this in Silverlight Spy, but it definitely works there so I can't see it being a problem doing it through Blend).
If you are not using Blend, just copy Default Style and Template of AutocompleteBox from MSDN and paste it into your App.xaml file (here is little tutorial on how to handle styles in app.xaml).
You can then modify that pasted style or template.

VS2010 Remove grid lines in WPF Design View

Is there a way to remove the annoying grid lines in the design view of Visual Studio 2010? Or at least style them to fade them off?
I'm not referring to the Grid component, but to the design view in WPF which draws visual lines over and around every components, making screens look like a soup in design view.
In Blend, if you disable Show Handles (in View > Show Handles, or F9), you can turn off those stupid blue lines.
Pretty sure you can derive from Grid and build design-time meta-data assembly with it as described on this msdn blog:
http://blogs.msdn.com/b/wpfsldesigner/archive/2010/01/13/wpf-silverlight-design-time-code-sharing-part-i.aspx#required
The reason I suggest deriving from Grid is because you want the designer to load new meta data for the type. Hopefully this implementation will override default behaviour although I have not tried myself.
Can I ask why you want to make this change? I am interested.
You say not the Grid component but those blue lines are part of the Grid control and you can simple drag them off the screen to remove them. I do not see any other light blue lines in that first link. If the problem is when you are running the app then uncheck the 'show gridlines' property for the Grid in VS2010.

WPF UI Related question

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...

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