|
Hi,
I am developing a window application in WPF using MVVM pattern. I am not getting how to set focus on a control in MVVM pattern.
Please help.
Thanks
Amit
Amit
|
|
|
|
|
We have a WPF forum. What is the MVVM pattern ? I think we've become too obsessed with idiotic patterns that are used to try to be trendy. If a pattern does not suit your app, don't use it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
Hello...
I'm new to WCF. I'm working on a architecture where I need to convert my Business object class to Data Transfer Object class for accessing web service. At the same time I need to do the opposite. but I don't know how to this conversion?
Any help would be appreciated, specially with code sample.
Thanking in Advance
Johnny
|
|
|
|
|
I'd be astounded if half the point of WCF was not that it offers this type of serialisation for you. Even web services, which WCF will wrap, I believe, will do that for you.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Thanks for your quick response.
Actually i have to transfer the business object from my Desktop app to a remote WCF service .That's why
i think i have to convert my business object to DTO and vice versa.
How can i do this?
|
|
|
|
|
I don't know for sure, I just know that if you need to do any sort of conversion, then WCF only makes it harder to use a webservice, because I've written plenty of webservice clients and webservices, without ever having to do this.
Also, please don't cross post.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hello Johnny,
converting a BO to a DTO is a manual task which has to be done by yourself and not by WCF. But there is a sweet library called AutoMapper (http://automapper.codeplex.com/[^]) I can highly recommend. Its a convention-based object-object mapper which can handle the BO-to-DTO mapping and vice versa for you. Take a look and enjoy
Greetings,
Tobias
|
|
|
|
|
hi, trying to add a .wav file to my project's resources, and play it through axWindowsMediaPlayer1.
Problem is i dont quite know how to tell the axWindowsMediaPlayer1 where the file is.
I have tried the following:
WindowsFormsApplication1.Properties.Resources.tune (tune being the wav file)
except now the player has a problem because of no file extension, and if i add an extension, it plays nothing.
WindowsFormsApplication1.Properties.Resources.tune.wav (plays nothing, you can see why)
any help would be appreciated, thanks.
|
|
|
|
|
I don't think this will work, I've only ever been able to get WMP to play files in the file system. Unless you can set up a web server and make it think it's coming from an online source.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
In the Solution Explorer you can open the directory named Resources,click tune.wav.
Change its first advanced properties,so it would copy the wav file to the the directory where your program is.
axWindowsMediaPlayer1.URL = Application.StartupPath + "\\Resources\\tune.wav";
You can have a try.
My English is just so so,wish it can help you.
|
|
|
|
|
thaks for the replies, but is there anyway i can somehow pack the wav file into the program? i would rather it not be separate. thanks.
|
|
|
|
|
See this[^] article.
/ravi
|
|
|
|
|
Hi friends,
If some one knows about any link or article on mshtml Event Object Model
Please lead me ....
Thanks
|
|
|
|
|
|
In C++ I can pass parameters by value/reference(using &).
If I create an instance of a class using the new keyword in C++, and pass the pointer pointing to it by reference (reference to pointer, e.g. MyClass &* ptr), is it the same as passing a ref type by ref in C#?
As in both cases, the callee can change the object’s state, as well as point/refer to other objects.
What do you think?
|
|
|
|
|
I think the only way to be sure is to write some test code. I suspect you are wrong, in that you can't dereference a reference in C#, I think that ref basically is worthless if it's already a ref type, it adds nothing.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Here you go:
{
string s="a";
log("s="+s);
doubleString1(s);
log("s="+s);
doubleString2(ref s);
log("s="+s);
}
private void doubleString1(string s) { s+=s; }
private void doubleString2(ref string s) { s+=s; }
outputs:
s=a
s=a
s=aa
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
I am working on a screen capture project that uses a global mouse hook. It works great.
currently when the user holds the right mouse button down for a time the cursor changes to a hand.
see below
[DllImport("user32.dll")]
static extern IntPtr LoadCursor(IntPtr hInstance, int lpCursorName);
private int IDC_HAND = 32649; /// IDC_HAND = 32649;///IDC_UPARROW=32516///IDC_CROSS=32515
private const uint OCR_NORMAL = 32512;
on event
private void setcursor()
{
IntPtr hcursor = LoadCursor(IntPtr.Zero, IDC_HAND);/// IDC_HAND/// IDC_UPARROW//IDC_CROSS
bool ret_val = SetSystemCursor(hcursor, OCR_NORMAL);
}
What I need is a LARGE CROSS
so I made these changes
DllImport("user32.dll")]
static extern IntPtr LoadCursor(IntPtr hInstance, int lpCursorName);
private int IDC_CROSS=32515; /// IDC_HAND = 32649;///IDC_UPARROW=32516///IDC_CROSS=32515
private const uint OCR_NORMAL = 32512;
private void Form1_Load(object sender, EventArgs e)
{
RegistryKey loadcursor = Registry.CurrentUser.OpenSubKey("Control Panel\\Cursors", true);
loadcursor.SetValue("Crosshair","%SYSTEMROOT%\\Cursors\\lcross.cur");
loadcursor.Close();
}
on event
private void setcursor()
{
IntPtr hcursor = LoadCursor(IntPtr.Zero, IDC_CROSS);/// IDC_HAND/// IDC_UPARROW//IDC_CROSS
bool ret_val = SetSystemCursor(hcursor, OCR_NORMAL);
}
am changing the poiter of the crosshair cursor the crude way !
dont now how to make it apply the rgistry changes. so that you dont
have re boot to make changes apply.
I would do it in the private void setcursor(),
but there is no system "large crosshair cursor".
only lcross.cur in windows/cursors.
AM I MESSED UP OR WHAT?
Thanks,
Regards.
P.S.
here is a link to the published project
it works great. Just want to put a little polish on it.
www.softsourcesolutions.com/nabit.zip
modified on Friday, September 18, 2009 10:33 PM
|
|
|
|
|
I'm searching for a nice way to get notification from Web Service. Something like this, I call a method of WS and it register me in someway. Then when some other application calls another method then it should send me any kind of notification. I got exactly what I needed in How to Get Notifications from a .NET Web Service[^]but it can be go worse in some condition. I read about Duplex[^] but its WCF. So is there any cool way of doing this...?
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
I have an excel file payroll, I want to convert this file into xml file format DTD for interactive software
has anyone ever do that can help me, can provide the source code for me.
Thanks
kmt
|
|
|
|
|
|
hi
when i write a character in google search bar then it appears all or part of things that started with this character
so i want to know if it is xml technology or what
and how to use this with a c# application connecting to sql server database
thanks
Mohamed
|
|
|
|
|
Hi,
assuming a TextBox, the basic principle is to provide a handler for the TextChanged event; in there, the text is used in a search command (say a SELECT * FROM ... WHERE ... in SQL) and the results are shown in a DropDown, a ToolTip, or whatever you choose.
So basically there is one database query for each character you type into the TextBox.
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
thanks very much dude
you answered my question
|
|
|
|