|
Hi All,
I am able to add column into a gridview as follows:
<ListView Name="listView1"
ItemsSource="{Binding}" Margin="11,26,115,44">
<ListView.View >
<GridView >
<GridViewColumn Header="ID" DisplayMemberBinding="{Binding ID}" />
<GridViewColumn Header="Span Length" DisplayMemberBinding="{Binding Span Length}" />
</GridView>
</ListView.View>
</ListView >
but i want to add multiple column into a single column in the abovew grid view i mean that, i have create some groups to show data into single gridview.
can anybody help me how it is possible because i am new with xaml...
Thanks
Bankey
|
|
|
|
|
Do you mean you want to show multiple bound items in a GridViewColumn? If so, you can bind multiple items into a data template like this:
<DataTemplate>
<TextBlock>
<TextBlock Text="{Binding Path=...}" />
<TextBlock Text="{Binding Path=...}" />
</TextBlock>
</DataTemplate>
|
|
|
|
|
Here are two other ways you can do this.
1. Use a MultiValue Converter that concatenates the two strings and places the output in one TextBlock. I demonstrate this techniques in my article: http://www.codeproject.com/KB/WPF/WPFBusinessAppsPartThree.aspx[^]. This article also has the required value converter code and xaml usage.
Look at the below xaml. See how the MultiBinding Converter syntax works, it takes muliple string values and binding them to one property. MultiBinding converters are a great WPF feature.
<Core_WPF:FormNotification WatermarkMessage="New Record"
Height="28" Panel.ZIndex="99" AutoCollapseTimeout="2">
<Core_WPF:FormNotification.ErrorMessage>
<MultiBinding Converter="{StaticResource formNotificationErrorMessageConverter}">
<Binding Path="Error" />
<Binding Path="ValidationExceptionErrors" ElementName="ucPartThree" />
</MultiBinding>
</Core_WPF:FormNotification.ErrorMessage>
</Core_WPF:FormNotification>
2. In addition to Pete's code of placing the two TextBlocks inside another TextBlock, you could also use a StackPanel as a container for the two TextBlocks.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Karl - that's the thing I really love about WPF. So many ways to solve the same problem, all of them flexible.
|
|
|
|
|
Pete O'Hanlon wrote: the thing I really love about WPF. So many ways to solve the same problem
Me too!
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Hi,
I'm looking for a way to flip an Image Object horizontally and vertically in C#/WPF.
I couldn't find anything on the web. Hope someone can help me.
Thanks,
Kevin
modified on Wednesday, May 14, 2008 4:07 AM
|
|
|
|
|
In order to flip an image, you need to use the ScaleTransform. For instance:
<ScaleTransform ScaleX="1" ScaleY="-1"> This flips over the Y.
|
|
|
|
|
Wow thanks.
I've been searching for over an hour. And now I've got it in less then 10 minutes.
Thank you for your help.
|
|
|
|
|
No problem. Glad to help.
|
|
|
|
|
Kevin,
Have you downloaded Express Blend yet? If not, currently the March 2008 Preview is free.
The is a SUPER GUI WPF tool that can help you accomplish tasks by setting properties and learn WPF at the same time by studying the XAML code.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Karl Shifflett wrote: Have you downloaded Express Blend yet?
Full version completely free for me - Google "Microsoft Dreamspark". I know it's a clever marketing ploy but you gotta love them for it. Currently installing Server 2003 onto a spare hard-drive ready for return to Uni in three weeks (planning to leave the desktop here at home now I've got a new laptop).
|
|
|
|
|
Ed,
Blend has been free since it came out, because they keep releasing new beta and preview versions.
At some point, a purchase will be required unless you have an MSDN subscription, etc.
Super product!
modified 27-Feb-21 21:01pm.
|
|
|
|
|
I realise that it's been free with respects to the betas but if people want a "stable" version then I thought it wasn't?
Sorry just wanted to shout out about the DreamSpark project because it's so great
|
|
|
|
|
Very stable. We have the preview in production and have all the betas in production since day one.
It's just a super XAML tool, so it really won't hurt your application the build.
A few very minor items to get used to, but he payback is huge.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
I'd certainly look into it but at the moment my programming seems to being steered towards Delphi (Uni) and ASP.NET.
|
|
|
|
|
|
Thanks for the suggestions, however I think I'd better get on with revision rather than messing around with Blend
|
|
|
|
|
|
Nope end of first year and I haven't really paid that much attention through the year
|
|
|
|
|
Ahhh. But seriously though - Delphi???? This is the reason grads have so much trouble finding decent work when they leave Uni - lack of practical experience (although you should be all right in that respect).
|
|
|
|
|
Though not a Computer Science degree as you might think. Electrical & Electronics Engineering for me, although at the moment I am doing much better in the software & digital electronics side of things, suprise suprise
|
|
|
|
|
Pete & Ed,
Pete is correct. The first time i saw Blend, I went nuts. AHHHHHHHHHHHH,,,,, WHAT'S THIS?????????
Then I started to feel the love and look at Blend as a designer tool, then went around giving presentations showing developers this is the coolest tool, with an "artboard" and "property inspector."
I used lynda.com for two months and also have a subscription to Total Training.
The Microsoft Expressin site also has many links to free training material.
In attition, you can surf the web, many people have videos out there, showing off what they did with Blend.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
How does XNA relate to DirectX and vice versa?
|
|
|
|
|
XNA is a gaming framework built on top of DirectX. It's like asking how does a button relate to GDI+.
|
|
|
|
|
Doesn't it also depend on what part your using?
I've been looking into audio support for my app recently and it seems that XAudio2 is going to be a complete wholesale replacement of DirectSound. XAudio2 being cross platform between XBox and PC.
Hmm ... I'm really not making any progress on my audio implementation either
Jammer
Going where everyone here has gone before!
My Blog
|
|
|
|