|
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.
|
|
|
|
|
Hi,
I'm making a WPF application. It is like an organizer.
The number of columns is fixed at 5, but the number of rows varies. It will be based on time interval selected by the user, which is 5, 10, 20, 30 min interval. How can I make a table that can adjust itself according to the user defined time interval?
Thanks in advance
|
|
|
|
|
Are you using a Gridview? or do you show a datatemplate in a listview?
Either way you can use a timer to do this. Here is some information about that on MSDN:
http://msdn.microsoft.com/en-us/library/system.threading.timer.aspx[^]
In the TimerCallback you can add items to the list you are showing.
Dawn is nature's way of telling you to go to bed.
|
|
|
|
|
I'm developing editor application in WPF. It is somewhat similar to Microsoft visio.
It supports the rotation of multiple elements placed on the editor canvas. I'm rightnow facing a problem in drawing a adorner (bounding rectangle) around the multiple objects. Let me describe the problem in detail :
Each element placed in the editor will display the adorner to do operation like resize, rotation etc. When multiple elements are selected, adorner (rectangle) will be drawn covering all the objects. When elements are not rotated, drawing adorner (rectangle) is not a problem. But when elements are rotated at some degree, I also will have to draw the adorner (rectangle) in rotated position. In rotated position if I do the resize operation then I'm not able to place the adorner properly i.e. exactly surrounding to elements. Can any one pls help me on how I can draw the proper adorner (bounding rectangle) after each resize operation in rotated position?
I hope I'm clear with my question. If not pls ask for clarification of see how multiple object rotation works in Visio. I have run out of idea on how to fix this problem so looking forward to have some help/suggestions from members.
Regards,
|
|
|
|
|
RenderTransform.TransformBounds returns an axis aligned rectangle, if that isn't what you want try http://www.codeproject.com/KB/WPF/WPFDiagramDesigner_Part1.aspx
If your using Canvas.SetLeft/Top instead of a TranslateTransform you may have to tweak it.
Rectangle rotated = new Rectangle {Width = 100, Height = 60, Fill = Brushes.Orange};
rotated.RenderTransform = new TransformGroup {Children = {new RotateTransform(35), new TranslateTransform(60, 30)}};
canvas.Children.Add(rotated);
rotated.Loaded += ((s, e2) =>
{
Rect r = VisualTreeHelper.GetDescendantBounds(rotated);
r = rotated.RenderTransform.TransformBounds(r);
Rectangle border = new Rectangle {Width = r.Width, Height = r.Height, Stroke = Brushes.DodgerBlue, StrokeThickness = 2, RenderTransform = new TranslateTransform(r.X, r.Y)};
canvas.Children.Add(border);
});
|
|
|
|