|
Santhapur - I can't see your code. Could you post it again using the < and > tags instead?
|
|
|
|
|
<Window x:Class="WpfApplication2.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300">
<Grid>
<ListBox Height="70" VerticalAlignment="Top">
<ListBox.ContextMenu>
<ContextMenu>
<MenuItem Header="Send" Click="MenuItem_Click"/>
</ContextMenu>
</ListBox.ContextMenu>
<ListBoxItem>Santhapur</ListBoxItem>
</ListBox>
</Grid>
</Window>
Santhapur
|
|
|
|
|
Santhapur - the easy way to do this is to blow the ListBoxItem open a bit. Consider the following bit that replaces the entry in the ListBox section.
<ListBoxItem>
<ListBoxItem.Content>
<TextBlock Text="Santhapur">
<TextBlock.ContextMenu>
<ContextMenu>
<MenuItem Header="Send" />
</ContextMenu>
</TextBlock.ContextMenu>
</TextBlock>
</ListBoxItem.Content>
</ListBoxItem> That should do it for you. The context menu is now associated with the textblock, which is the list box item.
|
|
|
|
|
|
You're welcome. Don't you just love WPF? So many ways you can do things - and easier to get at EXACTLY the thing you want to do, rather than having to fight your way through APIs.
|
|
|
|
|
I am using
<listBox>
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
</grid>
</DataTemplate>
</ListBox.ItemTemplate>
</listBox>
I wrote context menu inside the Grid tags. But i am not getting the menu on it..
can any one help
|
|
|
|
|
HI
I have a .xaml file which contains view box which in tearn contains some graphics using WPF.Shapes. I have handdled few events (eg Click event of Path etc).
Now I want to shift this file in a resource and use in my user control. Is it possble to get the events definded in the xaml inside the user control and can I access the veiwbox form the xaml inside my user control?
|
|
|
|
|
Yes to everything, no problem. Works just like you are in a window.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Karl's Back!!!!! Wooo! Welcome fella!
|
|
|
|
|
It certainly is good to see the Molenator back, and now a Microsoftie - oh how I wish. Way to go Karl.
|
|
|
|
|
Jammer,
Thanks for the Woooo!!!
Check my blog on Friday, XAMLPowerToys!!
modified 27-Feb-21 21:01pm.
|
|
|
|
|
No bother!!
I just checked your blog (it's friday here!) and no XAMLPowerToys so I'm going to go sulk in the corner until they appear ...
|
|
|
|
|
Jammer,
I added a new feature late last night and need just a little more testing time.
Shooting for Saturday, Sunday at the latest.
Dude, you'll be glad I took an extra day!
modified 27-Feb-21 21:01pm.
|
|
|
|
|
Hmmm. Now you've got me wondering.
|
|
|
|
|
I just keep thinking about features!!!! AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH.
Promise to stop adding features after tomorrow and get it out the door.
modified 27-Feb-21 21:01pm.
|
|
|
|
|
I made the mistake of talking to somebody yesterday about a WPF calendar control. Now, I just have to write one (well, I started one last night).
|
|
|
|
|
Just ... one ... more ... thing ... doh!!
|
|
|
|
|
I'm now trying to write a lookless calendar control. I'm guessing that I'm going to have to stop adding features at some point, but WPF just makes it so damn easy.
|
|
|
|
|
|
Hey guys...
As you may or may not know im busy working on a WPF calender / roster control.
At the moment ive got the logic that changes the day numbers on the cells when month or year changes, i context menu that pops up when a day cell that has a number is right clicked, and once an entry is chosen the style changes accordingly.
the next step would be to select a day by left clicking it, this is for some "copy and paste" functionality.
the idea is to add some kind of a style or effect over the cells existing style, kind of like when you select an icon on your pc.
any ideas would be appreciated...
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
Highlight it? Change colour of the cell/border. Alternatively, and one that is simple in WPF, expand the size of the cell and put a shadow under it to make it look 3D.
|
|
|
|
|
Pete O'Hanlon wrote: Change colour of the border
why didnt I think of that i think that will do nicely, and maybe even thiken the border a little.
Pete O'Hanlon wrote: expand the size of the cell and put a shadow under it to make it look 3D.
sounds cool, but i dont think it will work in this situation cause more than one cell will be selected at the same time.
Thanx master Yoda
TTYL
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
Harvey Saayman wrote: Pete O'Hanlon wrote:
expand the size of the cell and put a shadow under it to make it look 3D.
sounds cool, but i dont think it will work in this situation cause more than one cell will be selected at the same time.
Hmmm. I may just have to play with this. Maybe there's an article in it.
And, you're welcome.
|
|
|
|
|
Hi All,
Can someone please tell me whether WPF can be used to render mock UI say as web pages? What I am looking at is ability to develop quick UI to demo the product/module functionality.
If yes can someone please guide me where do I start?
Thanks and Regards
|
|
|
|
|
psychedelic_fur wrote: Can someone please tell me whether WPF can be used to render mock UI
Yes.
psychedelic_fur wrote: If yes can someone please guide me where do I start?
The best way to mock out your UI is to use Expression Blend. It will save you so much time.
|
|
|
|