|
AFAIK you can't embed C# in XAML.
You can, however, create child elements of your "destinationTag"
Grid using C#....is that what you need to do?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: is that what you need to do?
No, thanks I thought maybe we can do it like HTML and JavaScript.
BTW I didn't want embed C# in XAML , I've wanted to copy XAML codes with C# from a side XAML file to the other side of it.
Do u understand what I mean ?
modified on Saturday, December 27, 2008 1:27 PM
|
|
|
|
|
Actually, you can embed .NET language code within XAML by placing it within <x:code xmlns:x="#unknown"> tags. Such code is moved into the generated partial class by the compiler, and the language must match the language of the containing project (i.e. you can't embed C# in a VB proj).
While I can't think of any good reason to do this, it is possible.
Keith
|
|
|
|
|
Thanks. I didn't know that
Have any examples (or links to examples)?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
<Button Click="button_Click">Ok</Button>
<x:Code><!CDATA[
void button_Click(object sender, RoutedEventArgs e)
{
this.Close();
}
]]></x:Code>
This example is taken from WPF Unleashed by Adam Nathan. Wrapping in CDATA is not required, but avoids the need to escape less-than, greater-than, and ampersand chars.
I am not aware of any links to more examples; probably because I can't think of any instance where coding in this manner would be a good idea.
Keith
P.S. Sorry about the formatting, couldn't figure out how to embed the XAML tags properly.
|
|
|
|
|
Thanks Keith. Much appreciated.
I just wanted to see what it looked like, and it really works!
Cheers,
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
Hi! I am a WPF beginner.
I just want to make an UI using WPF for an old unmanged Application coded by C++.
I want to using CCW(Com Callable Wrapper) between the managed and unmanaged world.
Following requirement is needed:
1. To keep the app unmanaged except UI;
2. To play video stream from the unmanaged app in WPF UI.
Best wishes for all and Merry chrismas!
Any help or hints are greatly appreciated!
Lance
|
|
|
|
|
|
Thank you for your reply!
I will take your suggestion into account and research it.
I will share my experience if I get any solution.
modified on Monday, December 29, 2008 2:54 AM
|
|
|
|
|
Ok,
keep in touch
that's my mail: terrasi.carmelo@gmail.com
Bye and Happy New Year
|
|
|
|
|
hi All,
I am Currently Working on Wpf And WinForms using SCSF. Any one can please help me in this ,how to Develop The Themes Concept in Wpf or Win application .If any one knows Articles please FWD the Links it helps lot.
Thanks And Regards,
Guru
|
|
|
|
|
|
Hi Friends,
I am new to WPF programming, please help me out with the following Issue:
The text in the TextBox are separated,, i.e, like N 23°23.65, here User enters N first, after that he should press Tab to edit the next field (i.e, Degrees field) and then again press tab to edit next field (minutes field)....
Kindly help me...
Thanks in Advance...
|
|
|
|
|
Try this:
<StackPanel Orientation="Horizontal">
<TextBox x:Name="Northing" />
<TextBlock Text="°" />
<TextBox x:Name="Degrees" />
<TextBlock Text="." />
<TextBox x:Name="Minutes" />
</StackPanel>
|
|
|
|
|
Hi Bro,
Thanks for the reply...
Also i have to Data Bind this into a single field in the Dataset... How can i do this??? please help me out with this issue...
|
|
|
|
|
Hi
I am unable to place a checkbox in the header of the column in datagrid.
plz help me...
Thanks
Satish
|
|
|
|
|
You can customize the Header Template. You can easily find out the header template in Blend.
|
|
|
|
|
Is there any idea/code to make map maker(earth surface rendering with lights and clouds) using wpf?
|
|
|
|
|
I doubt there's any samples available in WPF. Typical applications that do this tend to use fractal mathematics to generate random heightmaps which get transformed into terrains. You might want to google terrain mapping directx to get started.
|
|
|
|
|
hello everbody;
i want a help for a black game codes using silverlight and c# in this week,this is my lesson project and i will give it at the end of this week,is somebody help me
|
|
|
|
|
So you're asking for help with your homework? Oh dear - we don't do that on this site.
|
|
|
|
|
you say good but i must do it at the end of this weekend,i did some animations in expression blend,but i stoped in the c# codes,i didnt do the card sharing
|
|
|
|
|
I'm sorry, but that's your problem. If you can't write the code for yourself, why do you think we will help you cheat? Your homework isn't a test to see if we can write code, it's to see if you can. When I used to do my homework, I did it myself - I didn't expect somebody else to do it for me.
|
|
|
|
|
Hi,
I want to cal my event handler when my custom wpf control is deleted from the designer. I want to know which event I need to override? or for which event I should attach my event handler?
Please give some input.
Regards,
Bharath
modified on Monday, December 22, 2008 2:25 AM
|
|
|
|