|
Ya I think that I will add a GroupName property to the PartDescriptionModel. Then I will set all 3 to a unique value when I'm loading the collection. Then bind the GroupName to that property. That ought to do it.
Everything makes sense in someone's mind
|
|
|
|
|
Hey all,
I am working on some code for Silverlight / windows phone:
I have 2 Xaml pages , Main and Second page:
Main page , I have a button. With default text. " button"
I have an OnHold event, that navigates to Second.xaml page.
On Second.xaml page is a ListBox. With lets say 3 ListBoxItems. item1, item2 and item3.
Here's where I am lost.
I want to have my selected item() 1 2 or 3, do 2 things:
1. Update the text in the button on the MainPage.xaml. The text says "item1" or whateveritem I selected.
2. The selected item in the listbox also selects an object in a folder. Call this folder resources. and the objects lets say are text or png files or whatever...just something I created outside of the IDE.
I wil worry about any OnClick functions or what to do with the objects in the folder later. Its the selection / update upon multiple pages that gets me right now.
|
|
|
|
|
You mean auto select a file / folder in an external Windows Explorer window?
You can just do something like:
System.Diagnostics.Process.Start("explorer.exe", avi.Path);
and it will auto-select the folder / file in avi.Path for you.
Does Main have a reference to Second? or does Second have a reference to Main? Really, in proper MVVM, they shouldn't know about each other, so you should use something like a messenger service to communicate between views.
|
|
|
|
|
Well actually I think simpler than that?
this is strictly going to be a windows phone application using a couple xaml pages. No windows.exe or anything like that.
so no mesenger service either as navigating from one xaml to another in a windows phone app is normal and accepted.
|
|
|
|
|
Do you have a reference to the other page? You could just subscribe to a simple event.
|
|
|
|
|
A reference? Well the only reference I have in a snece is the button OnHold event navigationg to the second page.
|
|
|
|
|
Hmm.. well, I'll have to hand you off to the Silverlight guys then. If you don't have a reference to the page and don't want to use messenger (which is really simple IMO), then I'd think you'd need a global static class that exposes an event or holds the references there. There might be something to handle that in Silverlight that I'm not aware of. In WPF, I'd certainly use messenger to communicate between views.
|
|
|
|
|
Hi, I'm drawing on a topmost semitransparent Window. I'd draw rectangle with transparent background.
I tried:
rec.Fill = new SolidColorBrush(Color.FromArgb(0, 255, 255, 255));
canvas.Children.Add(rec);
but doesn't work. How can I do?
|
|
|
|
|
I know how to create a flat style button with just the image showing unless the user hovers over it or when it's pressed. I don't know how to do the same thing for a toggle button. I need it be flat (image only) in a normal state but when the user hovers over it or when it is pressed or when IsChecked=True the state behaves like the default toggle button. I tried modifying the Normal state only but when I do, the MouseOver state no longer behaves the same way.
Any ideas?
Let me know,
Aaron
|
|
|
|
|
Hi,
I have a Silverlight application where in the browser which loads a WCFClient dll requests the data from a server a WCFService dll.The IE has many graphic elements on the browser window which are populated with the data retrieved from the WCFService. The issue here is the server is throwing the below exception when the the number of graphic elements configured exceeds.Also the data is not populated in these graphic elements.
[HttpWebRequest_WebException_RemoteServer]
Arguments: NotFound
Debugging resource strings are unavailable...
Going through the below blog
http://forums.silverlight.net/t/133801.aspx/3/10[^]
observed that the issue could be with the following tag configured in my WCFService projects Web.config file
<dataContractSerializer maxItemsInObjectGraph="2000000000"/>
Could any one of you please tell me how to go about fixing this issue?
Thanks
Satya
Today is a gift, that's why it is called the present.
|
|
|
|
|
Hi all, I've a transparent topmost window, I need on mouse move to highlight the window under the cursor
I tried so in mouse_move_handler:
...
this.Hide();
hWnd = Win32.WindowFromPoint(p);
this.Show();
...
Win32.GetWindowRect(hWnd, ref rc);
and so on drawing rectangle
...
this code works, but I can't avoid flicker.
There is some alternative way to do this?
|
|
|
|
|
I'm not surprised you've got flickering. You keep showing and hiding a window in there, and it looks as though you are calling this on every mouse move - that's a lot of event updates you're calling this code in. You also haven't shown the code where you're highlighting, this will also be called a lot of times.
What is the purpose of the Hide/Show code? What are you changing the visibility of?
Are you tracking to see if the window that was last updated matches the one retrieved in WindowFromPoint? If not, that's an obvious optimisation.
|
|
|
|
|
The main problem is to get the hwnd of the window immediately under my wpf topmost Window.
|
|
|
|
|
To be honest, I'm not sure why you're dropping down to GDI to achieve this. There are ways to get the positions of windows that do not rely on dropping down to interop to retrieve these items. You can use the Visual tree and perform your calculations based off that.
|
|
|
|
|
because with visual tree I can handle only the windows that own to my application, but under the mouse cursor there may be a window of any application running on desktop.
|
|
|
|
|
Ah, I see. So you're evaluating ALL windows then.
Well, you're going to have to optimise your hit tests then I'm afraid.
|
|
|
|
|
I don't know how perform hit test without hiding my window...
|
|
|
|
|
Probably the easiest way to code this is to enumerate all the windows using EnumDesktopWindows[^]. You can use this to iterate over and do your point in rectangle tests. That way, you aren't relying on showing/hiding windows.
|
|
|
|
|
I use EnumWindows, the problem is that more than one windows pass the check(point in rect). How can I determine the right window on which lies the mouse?
|
|
|
|
|
I would guess the top most window (not counting your own).
|
|
|
|
|
Hi,
How is it possible to double click a selected row and be redirected to a separate page?
Thanks
|
|
|
|
|
A simple mechanism to handle to do this is to add an attached behaviour, as described here[^].
|
|
|
|
|
|
|
If you are using SL 5, you can use Click Count as described here[^].
|
|
|
|