![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | WPF user controls without XAML Does anybody know of any samples of creating and then using a WPF based user control that does not required the use of the XAML files. The control I am attempting to write, is too use DrawingVisuals as its for drawing some mapping data which will contain a large number of shape objects. I have attempted to create a control but cannot find a way of refering to it in a WPF application, if i create an programatic instace is never displayed. All the publications I have fond to date alays seem to use the XAML way of programming, and donot seem to cater for large dynamic graphic controls which wouled be butter severed with c# code. Thansk in advance. |
My System Specs![]() |
| | #2 (permalink) |
| | Re: WPF user controls without XAML Why not just use dynamic XAML? -- Bryan Phillips MCSD, MCDBA, MCSE Blog: http://bphillips76.spaces.live.com Web Site: http://www.composablesystems.net "Cairn" <Cairn@discussions.microsoft.com> wrote in message news:3DAED165-4240-45EE-8A4C-7A78033C9B79@microsoft.com: > Does anybody know of any samples of creating and then using a WPF based user > control that does not required the use of the XAML files. The control I am > attempting to write, is too use DrawingVisuals as its for drawing some > mapping data which will contain a large number of shape objects. I have > attempted to create a control but cannot find a way of refering to it in a > WPF application, if i create an programatic instace is never displayed. All > the publications I have fond to date alays seem to use the XAML way of > programming, and donot seem to cater for large dynamic graphic controls which > wouled be butter severed with c# code. > > Thansk in advance. |
My System Specs![]() |
| | #3 (permalink) |
| | RE: WPF user controls without XAML You have a couple of options for custom drawing, but neither of them involves user controls. You can can derive from FrameworkElement, override OnRender(), and do your drawing there. Or, you can derive from a class like Panel and add your visuals using AddVisualChild() and AddLogicalChild(). Just remember to override VisualChildrenCount and GetVisual(). M@ > Does anybody know of any samples of creating and then using a WPF based user > control that does not required the use of the XAML files. The control I am > attempting to write, is too use DrawingVisuals as its for drawing some > mapping data which will contain a large number of shape objects. I have > attempted to create a control but cannot find a way of refering to it in a > WPF application, if i create an programatic instace is never displayed. All > the publications I have fond to date alays seem to use the XAML way of > programming, and donot seem to cater for large dynamic graphic controls which > wouled be butter severed with c# code. > > Thansk in advance. |
My System Specs![]() |