|
Congratulations. It's just a shame you've had to use the Interop Helpers; they are such a bind. Pun unintended.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
That was actually what I meant. I should have put in more details.
|
|
|
|
|
Hello!
I have such task - to create control that union two controls (DataGrid from WPFToolkit and standard Toolbar). On a large scale, it doesn't matter what particular controls it unions, I need to find out the common practices that can be used to build what I need. At first glance, I need something like user control, i.e composition of controls, that I can implement as a whole and reuse then. But, my task requires me to have possibility to tune my composite control in XAML. So, if I compose Toolbar and DataGrid, I want properties and events of both them would be exposed. So I could set in XAML both, for example, columns of datagrid and bars of toolbar:
(I put spaces in tag names intentionally, because loacal parser didn't type them for some reason)
< MyDataGridToolBarControl ><br />
< DataGrid ><br />
< DataGrid.Columns ><br />
< DataGridTextColumn Header="firstColumn" ><br />
< /DataGridTextColumn ><br />
< DataGridTextColumn Header="secondColumn" /><br />
< /DataGrid.Columns ><br />
< /DataGrid ><br />
< ToolBar Background="{x:Null}" > <br />
<button tooltip="New"><br />
<image source="New.png" /><br />
</button><br />
<button tooltip="Save"><br />
<image source="Save.png" /><br />
</button><br />
<button tooltip="Delete"><br />
<image source="Delete.png" /><br />
</button> <br />
< /ToolBar ><br />
< /MyDataGridToolBarControl >
The only decison that suits me less or mor for now is to make custom control inherited from Datarid (as DataGrid is more significant in this pair) and redefine Template including both datagrid and toolbar. This gives me all power of datagrid but, if I want get Toolbar part, I need to do it through code, seeking it in viual and logical trees i.e. getting access o it programmatcally, which is not pretty decision.
Please help a newbie to solve this task ) Thanks in advance...
|
|
|
|
|
You're obviously very new to this. Any property you add to your control, can be set from XAML.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Thats it, I'd like not to transmit every property and event of each component control to the level of composite control. I'd like (if it is posible) to inherit all of them! But multiple inheritance in c# is not allowed, so I can't go this way! So, because of it I am here and your answer is inappropriate. If you are lazy to answer, it would be better not answer at all. Thanks
|
|
|
|
|
Hi.
I'm working VS2008 SP1 and SilverLight 2.
My SL's Application has worked until 2 hours ago very well ,but Browsers just couldn't show it anymore.
BTW I change my project name manually
What's wrong with it ?
How can I fix it ?
Would appreciate for any guides.
|
|
|
|
|
If you changed the name of something, make sure the name is changed anywhere
in the code that's effected.
For example, if the name of the xap is now different, you may need to change
the reference to the xap in your hosting web page.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I've done it, but it didn't work.
I forced to make a new Project.
Thanks anyway.
|
|
|
|
|
Hello.
Is it possible to assign a command parameter to a canvas? Instead of using buttons we wish to use canvases for certain parts of the UI, but it needs to send a command parameter like a button. Can we do this?
Regards, E.
|
|
|
|
|
You mean command bindings ? See here Link[^]
|
|
|
|
|
Hello, exactly right
One issue though is lack of backspace or enter key support. Can we trigger these commands via a canvas press?
|
|
|
|
|
I might not be understanding your question correct. But wouldn't KeyBinding work ?
|
|
|
|
|
Dear All,
I am a newbie to .Net Framework 3.5.
I am interested in creating a web application using WPF.
I have created a WPF Browse application.
I don't know how to have it in my Virtual directory.
Can any one help me in this regard?
Thanks a lot in advance
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
You want to look in to silverlight, that's how you do WPF for the web.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Has anybody used these and got them to work?
I just get: The attachable property 'VisualStateGroups' was not found in type 'VisualStateManager'.
|
|
|
|
|
|
I did and came to the conclusion that I will get round to using themes when they are ready for non trivial apps.
Thanks.
|
|
|
|
|
I Have a requirement where i need to pass only sql select statement as a parameter to Service. Instead of writing query in the service i need to accept the query as a parameter.
Any suggestions, samples or links would be appreciated.
Thanks
|
|
|
|
|
You can't pass it as a string?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Well an string would work but... that could be quite dangerous, it's quite easy to make injection attacks with that technique.
I would limit that free querying to the final user.
HTH
Braulio
/// -------------------------
Braulio Díez
DBSchemaEditor.com
Free Silverlight based DB Schema Modeling Tool
/// -------------------------
|
|
|
|
|
|
From the MSDN link,
"Used within the template of an item control to specify the place in the control’s visual tree where the ItemsPanel defined by the ItemsControl is to be added."
(stress on the underlined words)
One way to look at it is, it gives you a starting point to start looking out for your Items in the Visual tree. You know, they surely will be in the ItemsPresenter (i.e. if you follow the use of ItemsPresenter in your ControlTemplates)
|
|
|
|
|
So we ought to use ItemsPresenter just in a visual tree !
Sorry if I couldn't realize it well
|
|
|
|
|
It's one of the ways I see it. It would come handy if you need to parse the visual tree. With DataTemplating and the styling flexibility of WPF traversing the tree might turn daunting, but ItemsPresenter might rescue you.
|
|
|
|
|
Thank you ABitSmart.
As far as I know , we should use ItemsPresenter in DataTemplating !
Isn't it ?
|
|
|
|